+2008-04-07 Aurelien Jarno <aurelien@aurel32.net>
+
+ * sysdep.c: add __GLIBC__ to the #ifdef preprocessor macros to
+ detect systems using GNU libc.
+ * gsocket.h: ditto.
+ * socket.c: ditto.
+ * adaint.c: ditto.
+ * link.c: ditto.
+
2008-04-07 Aurelien Jarno <aurelien@aurel32.net>
* s-osinte-linux-kfreebsd.ads (SC_NPROCESSORS_ONLN): New
strcpy (path, "GNAT-XXXXXX");
#if (defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) \
- || defined (linux)) && !defined (__vxworks)
+ || defined (linux) || defined(__GLIBC__)) && !defined (__vxworks)
return mkstemp (path);
#elif defined (__Lynx__)
mktemp (path);
}
#elif defined (linux) || defined (__FreeBSD__) || defined (__NetBSD__) \
- || defined (__OpenBSD__)
+ || defined (__OpenBSD__) || defined(__GLIBC__)
#define MAX_SAFE_PATH 1000
char *tmpdir = getenv ("TMPDIR");
}
#endif
-#if defined (linux)
+#if defined (linux) || defined(__GLIBC__)
/* pthread affinity support */
int __gnat_pthread_setaffinity_np (pthread_t th,
#if defined (_AIX) || defined (__FreeBSD__) || defined (__hpux__) || defined (__osf__) || defined (_WIN32) || defined (__APPLE__)
# define HAVE_THREAD_SAFE_GETxxxBYyyy 1
-#elif defined (sgi) || defined (linux) || (defined (sun) && defined (__SVR4) && !defined (__vxworks))
+#elif defined (sgi) || defined (linux) || defined (__GLIBC__) || (defined (sun) && defined (__SVR4) && !defined (__vxworks))
# define HAVE_GETxxxBYyyy_R 1
#endif
unsigned char __gnat_using_gnu_linker = 1;
const char *__gnat_object_library_extension = ".a";
-#elif defined (linux)
+#elif defined (linux) || defined(__GLIBC__)
const char *__gnat_object_file_option = "";
const char *__gnat_run_path_option = "-Wl,-rpath,";
char __gnat_shared_libgnat_default = STATIC;
struct hostent *rh;
int ri;
-#ifdef __linux__
+#if defined(__linux__) || defined(__GLIBC__)
(void) gethostbyname_r (name, ret, buf, buflen, &rh, h_errnop);
#else
rh = gethostbyname_r (name, ret, buf, buflen, h_errnop);
struct hostent *rh;
int ri;
-#ifdef __linux__
+#if defined(__linux__) || defined(__GLIBC__)
(void) gethostbyaddr_r (addr, len, type, ret, buf, buflen, &rh, h_errnop);
#else
rh = gethostbyaddr_r (addr, len, type, ret, buf, buflen, h_errnop);
struct servent *rh;
int ri;
-#ifdef __linux__
+#if defined(__linux__) || defined(__GLIBC__)
(void) getservbyname_r (name, proto, ret, buf, buflen, &rh);
#else
rh = getservbyname_r (name, proto, ret, buf, buflen);
struct servent *rh;
int ri;
-#ifdef __linux__
+#if defined(__linux__) || defined(__GLIBC__)
(void) getservbyport_r (port, proto, ret, buf, buflen, &rh);
#else
rh = getservbyport_r (port, proto, ret, buf, buflen);
|| (defined (__osf__) && ! defined (__alpha_vxworks)) || defined (WINNT) \
|| defined (__MACHTEN__) || defined (__hpux__) || defined (_AIX) \
|| (defined (__svr4__) && defined (i386)) || defined (__Lynx__) \
- || defined (__CYGWIN__) || defined (__FreeBSD__) || defined (__OpenBSD__)
+ || defined (__CYGWIN__) || defined (__FreeBSD__) || defined (__OpenBSD__) \
+ || defined (__GLIBC__)
#ifdef __MINGW32__
#if OLD_MINGW
|| (defined (__osf__) && ! defined (__alpha_vxworks)) \
|| defined (__CYGWIN32__) || defined (__MACHTEN__) || defined (__hpux__) \
|| defined (_AIX) || (defined (__svr4__) && defined (i386)) \
- || defined (__Lynx__) || defined (__FreeBSD__) || defined (__OpenBSD__)
+ || defined (__Lynx__) || defined (__FreeBSD__) || defined (__OpenBSD__) \
+ || defined (__GLIBC__)
char c;
int nread;
int good_one = 0;
#if defined(linux) || defined (sun) || defined (sgi) || defined (__EMX__) \
|| defined (__osf__) || defined (__MACHTEN__) || defined (__hpux__) \
|| defined (_AIX) || (defined (__svr4__) && defined (i386)) \
- || defined (__Lynx__) || defined (__FreeBSD__) || defined (__OpenBSD__)
+ || defined (__Lynx__) || defined (__FreeBSD__) || defined (__OpenBSD__) \
+ || defined (__GLIBC__)
eof_ch = termios_rec.c_cc[VEOF];
/* If waiting (i.e. Get_Immediate (Char)), set MIN = 1 and wait for
/* Darwin, Free BSD, Linux, Tru64, where there exists a component tm_gmtoff
in struct tm */
#elif defined (__APPLE__) || defined (__FreeBSD__) || defined (linux) ||\
- (defined (__alpha__) && defined (__osf__))
+ (defined (__alpha__) && defined (__osf__)) || defined (__GLIBC__)
*off = tp->tm_gmtoff;
/* All other platforms: Treat all time values in GMT */