* Any changes made here will be lost!
*/
-#ifndef REENTR_H
-#define REENTR_H
+#ifndef PERL_REENTR_H_
+#define PERL_REENTR_H_
/* If compiling for a threaded perl, we will macro-wrap the system/library
* interfaces (e.g. getpwent()) which have threaded versions
*/
#ifndef PERL_REENTR_API
-# if defined(PERL_CORE) || defined(PERL_EXT)
+# if defined(PERL_CORE) || defined(PERL_EXT) || defined(PERL_REENTRANT)
# define PERL_REENTR_API 1
# else
# define PERL_REENTR_API 0
# define NETDB_R_OBSOLETE
#endif
+#if defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 24))
+# undef HAS_READDIR_R
+# undef HAS_READDIR64_R
+#endif
+
/*
* As of OpenBSD 3.7, reentrant functions are now working, they just are
* incompatible with everyone else. To make OpenBSD happy, we have to