Compiling without linuxthreads broken

Andreas Jaeger aj@suse.de
Thu Jun 8 00:07:00 GMT 2000


The recent patches broke compiling glibc 2.2 CVS without linuxthreads:

genops.c: In function `_IO_list_lock':
genops.c:1060: warning: implicit declaration of function `_IO_lock_lock'
genops.c:1060: `list_all_lock' undeclared (first use in this function)
genops.c:1060: (Each undeclared identifier is reported only once
genops.c:1060: for each function it appears in.)
genops.c: In function `_IO_list_unlock':
genops.c:1066: warning: implicit declaration of function `_IO_lock_unlock'
genops.c:1066: `list_all_lock' undeclared (first use in this function)
genops.c: In function `_IO_list_resetlock':
genops.c:1072: warning: implicit declaration of function `_IO_lock_init'
genops.c:1072: `list_all_lock' undeclared (first use in this function)
make[2]: *** [/builds/glibc/20000608-disable-add-ons/libio/genops.o] Error 1

The problem is that libio/libio.h has the following fragment:
#ifdef _IO_MTSAFE_IO
# if defined __GLIBC__ && __GLIBC__ >= 2
#  include <bits/stdio-lock.h>
# else
/*# include <comthread.h>*/
# endif
#else
typedef void _IO_lock_t;
#endif

stdio-lock.h is not included if we compile without linuxthreads.
Should we just add an 
#ifdef _IO_MTSAFE_IO in _IO_list_lock etc?

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de


More information about the Libc-alpha mailing list