This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
make_ext.pl: Add some general comments
[perl5.git] / reentr.h
index c268851..6d085aa 100644 (file)
--- a/reentr.h
+++ b/reentr.h
@@ -12,8 +12,8 @@
  * 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
@@ -23,7 +23,7 @@
  */
 
 #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