newlib-cygwin/winsup/cygwin/libc
Corinna Vinschen 06ac671811 Only define __getreent inline function when building newlib or Cygwin
Commit 6f3943b erroneously removed the `#ifdef _COMPILING_NEWLIB'
guarding the __getreent inline function.  This patch ignored the
fact that config.h is included when building applications, and the
code in question requires internal, auto-generated headers to be
available which are not exposed to user-space.

Reinstantiate defined(_COMPILING_NEWLIB) test and alternatively
check for defined (__INSIDE_CYGWIN__), otherwise we'd have to
reinstantiate the __getreent macro in cygtls.h which is really
confusing.

While testing it turned out that a low number of source codes inside
Cygwin won't see the inline __getreent due to a missing __INSIDE_CYGWIN__
definition.  For malloc.cc this was actually deliberate to get different
definitions from including cygmalloc.h.  Change this by defining
__INSIDE_CYGWIN__ in malloc.cc but changing the test in cygmalloc.h
to test for defined(DLMALLOC_VERSION).  This might need a change if we
ever get around to replace dlmalloc with a newer, more threading-aware
malloc implementation.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-08-20 17:14:55 +02:00
..
arc4random_stir.c Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
base64.c Throughout Cygwin, use u_intN_t or uintN_t 2016-03-24 16:39:15 +01:00
bsdlib.cc * Throughout, use __try/__except/__endtry blocks, rather than myfault 2014-08-22 09:21:33 +00:00
fnmatch.c Feature test macros overhaul: fnmatch.h 2016-03-17 21:08:54 -05:00
fts.c * libc/bsdlib.cc (forkpty): Close master and slave if fork fails to 2014-05-22 09:45:17 +00:00
ftw.c * Merge in cygwin-64bit-branch. 2013-04-23 09:44:36 +00:00
getopt.c * libc/getopt.c (getopt_internal): Set optreset according to optind 2009-12-14 10:47:25 +00:00
inet_addr.c Throughout Cygwin, use u_intN_t or uintN_t 2016-03-24 16:39:15 +01:00
inet_network.c * Merge in cygwin-64bit-branch. 2013-04-23 09:44:36 +00:00
minires-os-if.c Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
minires.c Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
minires.h Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
nftw.c * Merge in cygwin-64bit-branch. 2013-04-23 09:44:36 +00:00
rcmd.cc Throughout Cygwin, use u_intN_t or uintN_t 2016-03-24 16:39:15 +01:00
rexec.cc Throughout Cygwin, use u_intN_t or uintN_t 2016-03-24 16:39:15 +01:00
strfmon.c Only define __getreent inline function when building newlib or Cygwin 2016-08-20 17:14:55 +02:00
strptime.cc POSIX-1.2008 per-thread locales, groundwork part 2 2016-08-15 10:56:56 +02:00
xsique.cc Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00