This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

How to handle *_unlocked when they're wrapped by _REENTRANT


	Ever since this patch:

 > 1998-12-08  Ulrich Drepper  <drepper@cygnus.com>
 > 
 >         * system.h: If the *_unlocked functions are available use them


I've been getting 20-30 warnings on platforms like solaris2.5 and OSF4.0:

 > gcc.c:5719: warning: implicit declaration of function `putc_unlocked'


This occurs because the *_unlocked functions are only defined in
stdio.h if special macros like _REENTRANT are defined.

	Another issue is that some of the unlocked functions are
actually macros, and the current AC_CHECK_FUNCS autoconf test doesn't
find them so they are not used.  These are also only defined when
something like _REENTRANT is set. 

	I was wondering what's the best way to solve this.  Perhaps we
could just define _REENTRANT at the top of system.h?  We would also
need to change this in system.h:

#ifdef HAVE_PUTC_UNLOCKED

to this:

#if defined (HAVE_PUTC_UNLOCKED) || defined (putc_unlocked)

	Comments?

		--Kaveh

--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Icon CMT Corp.


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