Integrate with Sarathy.
[p5sagit/p5-mst-13.2.git] / perl.h
diff --git a/perl.h b/perl.h
index 911b998..e6c6098 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -1173,7 +1173,7 @@ typedef NVTYPE NV;
 #endif
 
 #if !defined(Perl_atof) && defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
-#   if !defined(Perl_atof) && defined(HAS_STRTOLD)
+#   if !defined(Perl_atof) && defined(HAS_STRTOLD) 
 #       define Perl_atof(s) strtold(s, (char**)NULL)
 #   endif
 #   if !defined(Perl_atof) && defined(HAS_ATOLF)
@@ -3075,36 +3075,42 @@ typedef struct am_table_short AMTS;
 
 #endif /* !USE_LOCALE_NUMERIC */
 
-#if !defined(Atol) && defined(IV_IS_QUAD) && QUADKIND == QUAD_IS_LONG_LONG
+#if !defined(Strtol) && defined(USE_64_BIT_INT) && defined(IV_IS_QUAD) && QUADKIND == QUAD_IS_LONG_LONG
 #    ifdef __hpux
 #        define strtoll __strtoll      /* secret handshake */
 #    endif
-#   if !defined(Atol) && defined(HAS_STRTOLL)
-#       define Atol(s) strtoll(s, (char**)NULL, 10)
-#   endif
-#   if !defined(Atol) && defined(HAS_ATOLL)
-#       define Atol atoll
+#   if !defined(Strtol) && defined(HAS_STRTOLL)
+#       define Strtol  strtoll
 #   endif
 /* is there atoq() anywhere? */
 #endif
-#if !defined(Atol)
-#   define Atol atol /* we assume atol being available anywhere */
+#if !defined(Strtol) && defined(HAS_STRTOL)
+#   define Strtol      strtol
+#endif
+#ifndef Atol
+/* It would be more fashionable to use Strtol() to define atol()
+ * (as is done for Atoul(), see below) but for backward compatibility
+ * we just assume atol(). */
+#   define Atol                atol
 #endif
 
-#if !defined(Strtoul) && defined(UV_IS_QUAD) && QUADKIND == QUAD_IS_LONG_LONG
+#if !defined(Strtoul) && defined(USE_64_BIT_INT) && defined(UV_IS_QUAD) && QUADKIND == QUAD_IS_LONG_LONG
 #    ifdef __hpux
 #        define strtoull __strtoull    /* secret handshake */
 #    endif
 #    if !defined(Strtoul) && defined(HAS_STRTOULL)
-#       define Strtoul strtoull
+#       define Strtoul strtoull
+#    endif
+#    if !defined(Strtoul) && defined(HAS_STRTOUQ)
+#       define Strtoul strtouq
 #    endif
-#endif
 /* is there atouq() anywhere? */
-#if !defined(Strtoul) && defined(HAS_STRTOUQ)
-#   define Strtoul strtouq
 #endif
-#if !defined(Strtoul)
-#   define Strtoul strtoul /* we assume strtoul being available anywhere */
+#if !defined(Strtoul) && defined(HAS_STRTOUL)
+#   define Strtoul     strtoul
+#endif
+#ifndef Atoul
+#   define Atoul(s)    Strtoul(s, (char **)NULL, 10)
 #endif
 
 #if !defined(PERLIO_IS_STDIO) && defined(HASATTRIBUTE)
@@ -3204,7 +3210,11 @@ typedef struct am_table_short AMTS;
 #       define Semctl(id, num, cmd, semun) semctl(id, num, cmd, semun)
 #   else
 #       ifdef USE_SEMCTL_SEMID_DS
-#           define Semctl(id, num, cmd, semun) semctl(id, num, cmd, semun.buf)
+#           ifdef EXTRA_F_IN_SEMUN_BUF
+#               define Semctl(id, num, cmd, semun) semctl(id, num, cmd, semun.buff)
+#           else
+#               define Semctl(id, num, cmd, semun) semctl(id, num, cmd, semun.buf)
+#           endif
 #       endif
 #   endif
 #endif