Can you please elaborate why this patch is necessary? configure either
#undefs the macro or #defines it to 1, so #if and #ifdef should behave
identically.

Unfortunately configure does not work in the way you described,
see snippet of generated config.h bellow

The reason is that configure.ac contains:

      AC_DEFINE(HAVE_OSS,, [support oss sound interface])
      AC_DEFINE(HAVE_OSS_LINUX,, [linux oss system])
      AC_DEFINE(HAVE_OSS_SYS,, [soundcard.h in sys])
      AC_DEFINE(HAVE_OSS_MACHINE,, [soundcard.h in machine])

Iff it would contain

      AC_DEFINE(HAVE_OSS,1, [support oss sound interface])
      AC_DEFINE(HAVE_OSS_LINUX,1, [linux oss system])
      AC_DEFINE(HAVE_OSS_SYS,1, [soundcard.h in sys])
      AC_DEFINE(HAVE_OSS_MACHINE,1, [soundcard.h in machine])

it would work in the way you described.
Current (wrong) behaviour can be demonstrated by compiling
following snippet.

**************************
#define PROP2

#if PROP1
#warning PROP1 detected
#elif PROP2
#warning PROP2 detected
#else
#warning no PROP detected
#endif

int main(){};
**************************

It works on Linux, because HAVE_OSS_LINUX test is 1st and uses #ifdef.

Petr


****************************************************

/* Define to 1 if you have the `munmap' function. */
#define HAVE_MUNMAP 1

/* Define to 1 if you have the <nl_types.h> header file. */
#define HAVE_NL_TYPES_H 1

/* support oss sound interface */
#define HAVE_OSS

/* linux oss system */
/* #undef HAVE_OSS_LINUX */

/* soundcard.h in machine */
/* #undef HAVE_OSS_MACHINE */

/* soundcard.h in sys */
#define HAVE_OSS_SYS

/* Define if you have POSIX threads libraries and header files. */
/* #undef HAVE_PTHREAD */

/* have pthread_sigmask function */
#define HAVE_PTHREAD_SIGMASK



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to