Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 May 1996 07:27:59 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        gibbs@freefall.freebsd.org, smpatel@umiacs.umd.edu
Cc:        freebsd-current@freefall.freebsd.org, phk@critter.tfs.com
Subject:   Re: LINUX COMPAT_LINUX
Message-ID:  <199605022127.HAA32094@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>I believe that the Linux gcc defines "linux" not "LINUX", so any code

It defines "__linux__" and "linux".  Only sloppy code would depend on
"linux" or "LINUX" being defined by the compiler.  However, they might
be defined in the application's CFLAGS or headers.

>in our tree that is supposed to have conditional code for Linux should
>use the lowercase  define.  The only place I know of that uses this
>right now is the sequencer code for the aic7xxx driver.

Urk.  The sequencer code uses "linux", but the qcam code uses "LINUX".
It's surprising that it compiled in LINT.  It could not have worked,
because Linux has outb() back to front.

I'm going to hide the *LINUX #defines and some other #defines because 
using them would break the lkms:

---
diff -c2 src/sys/conf/options~ src/sys/conf/options
*** src/sys/conf/options~	Sat Mar 30 02:25:43 1996
--- src/sys/conf/options	Thu May  2 12:44:14 1996
***************
*** 6,16 ****
  DDB
  KTRACE
! FDESC		opt_staticfs.h
! KERNFS		opt_staticfs.h
! NULLFS		opt_staticfs.h
! PORTAL		opt_staticfs.h
! PROCFS		opt_staticfs.h
! UMAPFS		opt_staticfs.h
! UNION		opt_staticfs.h
  QUOTA
  SYSVSHM		opt_sysvipc.h
--- 6,25 ----
  DDB
  KTRACE
! 
! # Options for static file systems.  These should only be used at config
! # time, since the corresponding lkms cannot work if there are any static
! # dependencies.  Unusability is enforced by hiding the defines for the
! # options in a never-included header.
! FDESC		opt_dontuse.h
! KERNFS		opt_dontuse.h
! NULLFS		opt_dontuse.h
! PORTAL		opt_dontuse.h
! PROCFS		opt_dontuse.h
! UMAPFS		opt_dontuse.h
! 
! # The union static file system has bogus static dependencies, so it isn't
! # hidden yet.
! UNION
! 
  QUOTA
  SYSVSHM		opt_sysvipc.h
diff -c2 src/sys/i386/conf/options.i386~ src/sys/i386/conf/options.i386
*** src/sys/i386/conf/options.i386~	Thu May  2 05:34:58 1996
--- src/sys/i386/conf/options.i386	Fri May  3 06:40:10 1996
***************
*** 4,8 ****
  MATH_EMULATE		opt_math_emulate.h
  GPL_MATH_EMULATE	opt_math_emulate.h
! IBCS2			opt_ibcs2.h
  SHOW_BUSYBUFS		opt_machdep.h
  PANIC_REBOOT_WAIT_TIME	opt_machdep.h
--- 4,11 ----
  MATH_EMULATE		opt_math_emulate.h
  GPL_MATH_EMULATE	opt_math_emulate.h
! 
! IBCS2			opt_dontuse.h
! COMPAT_LINUX		opt_dontuse.h
! 
  SHOW_BUSYBUFS		opt_machdep.h
  PANIC_REBOOT_WAIT_TIME	opt_machdep.h
---

This would have avoided the problem with qcam when COMPAT_LINUX was named
LINUX.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605022127.HAA32094>