This is the mail archive of the libc-alpha@cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: glibc 2.0.95 [w. egcs]


>>>>> John Kennedy writes:

John> [Franz Sirl]
>> sendmail always needs fixing ;-)

John>   Yeah yeah.  If sendmail used configure, we could have blamed it on
John> that probably.  Sendmail is a unique little package.

>> These ["invalid exception specifications"] happen if a
>> typedef uses __P instead of __PMT. Go and edit (or copy
>> from glibc?) egcs/libio/libioP.h and egcs/libio/strfile.h
>> accordingly. Hope this works for 1.0.3, it did work for 1.1.

John>   Yup.  I also had to compile with -D_GNU_SOURCE to get some pthread
John> functions to get picked up in <pthread.h>.  I've included my
John> current patch, which looks Ok so far except for some (local egcs)
John> "include/stdarg.h" & "include/varargs.h" redefinition of `va_start'.

Hi John,

your egcs patch looks ok and I do hope that Uli adds those (or similar 
ones) to the current egcs cvs version so that egcs 1.1 will compile
under glibc 2.1 snapshots.

The problem you mentioned with -D_GNU_SOURCE is that 
_pthread_cleanup_push_defer is used in <bits/libc-lock.h> :
#define __libc_cleanup_region_start(FCT, ARG) \
  { struct _pthread_cleanup_buffer _buffer;				      \
    int _avail = _pthread_cleanup_push_defer != NULL;			      \
    if (_avail) {							      \
      _pthread_cleanup_push_defer (&_buffer, (FCT), (ARG));		      \
    }

which is used in <bits/stdio-lock.h>:
#define _IO_cleanup_region_start(_fct, _fp) \
     __libc_cleanup_region_start (_fct, _fp)

and e.g. libio/iostream.cc uses:
    if (opfx()) {
	_IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile,
				  _strbuf);


which leads to the following error:
  /mnt/cc/egcs/build/gcc/xgcc -B/mnt/cc/egcs/build/gcc/ -c -g -O2 -fvtable-thunks -fno-implicit-templates -I. -I../../../egcs_1_1_branch/libio -nostdinc++ -D_IO_MTSAFE_IO -fpic ../../../egcs_1_1_branch/libio/iostream.cc -o pic/iostream.o
../../../egcs_1_1_branch/libio/iostream.cc: In method `class ostream & ostream::operator <<(char)':
../../../egcs_1_1_branch/libio/iostream.cc:385: `_pthread_cleanup_push_defer' undeclared (first use this function)
../../../egcs_1_1_branch/libio/iostream.cc:385: (Each undeclared identifier is reported only once
../../../egcs_1_1_branch/libio/iostream.cc:385: for each function it appears in.)
../../../egcs_1_1_branch/libio/iostream.cc:386: confused by earlier errors, bailing out

Instead of compiling with -D_GNU_SOURCE, I changed <pthread.h> (Patch
appended - I don't think the patch is correct, I just want to show
where the problems are).


Uli, could you please make the neccessary changes to get egcs 1.1 (and
the mainstream version also) to compile under glibc 2.1 snapshots?

Thanks,
Andreas

--- /usr/glibc/src/libc/linuxthreads/sysdeps/pthread/pthread.h	Thu Jul  9 23:28:19 1998
+++ /usr/include/pthread.h	Fri Jul 31 17:53:24 1998
@@ -31,10 +31,10 @@
 
 #define PTHREAD_MUTEX_INITIALIZER \
   {0, 0, 0, PTHREAD_MUTEX_FAST_NP, {0, 0}}
-#ifdef __USE_GNU
+/*#ifdef __USE_GNU */
 # define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \
   {0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, {0, 0}}
-#endif
+/*#endif */
 
 #define PTHREAD_COND_INITIALIZER {{0, 0}, 0}
 
@@ -510,7 +510,7 @@
 /* Install a cleanup handler as pthread_cleanup_push does, but also
    saves the current cancellation type and set it to deferred cancellation. */
 
-#ifdef __USE_GNU
+/* #ifdef __USE_GNU*/
 # define pthread_cleanup_push_defer_np(routine,arg)			      \
   { struct _pthread_cleanup_buffer _buffer;				      \
     _pthread_cleanup_push_defer (&_buffer, (routine), (arg));
@@ -528,7 +528,7 @@
 
 extern void _pthread_cleanup_pop_restore __P ((struct _pthread_cleanup_buffer *__buffer,
 					       int __execute));
-#endif
+/*#endif*/
 
 /* Functions for handling signals. */
 #include <bits/sigthread.h>

-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@alma.student.uni-kl.de


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]