summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-01-15 22:26:16 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-01-15 22:26:16 +0000
commitff935051c0581ebaf8a1cbeb640d7c48ba85cbbc (patch)
treeafb0bc01beeadf71f36cb170573472e37b457d58 /perl.h
parent434d2535978fdc93cf6e9722bc7f9d272a9c2632 (diff)
downloadperl-ff935051c0581ebaf8a1cbeb640d7c48ba85cbbc.tar.gz
Metaconfig and Porting patches from Andy; start using the new
long long and long double thingies from #4804; regen Configure. p4raw-id: //depot/cfgperl@4805
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h38
1 files changed, 26 insertions, 12 deletions
diff --git a/perl.h b/perl.h
index f77b823f1b..3310aab632 100644
--- a/perl.h
+++ b/perl.h
@@ -1089,10 +1089,16 @@ typedef NVTYPE NV;
# define Perl_fmod fmod
#endif
-#if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) && defined(HAS_ATOLF)
-# define Perl_atof atolf
-#else
-# define Perl_atof atof
+#if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
+# if !defined(Perl_atof) && defined(HAS_STRTOLD)
+# define Perl_atof(s) strtold(s, (char*)0)
+# endif
+# if !defined(Perl_atof) && defined(HAS_ATOLF)
+# define Perl_atof atolf
+# endif
+#endif
+#if !defined(Perl_atof)
+# define Perl_atof atof /* we assume atof being available anywhere */
#endif
/* Previously these definitions used hardcoded figures.
@@ -2979,16 +2985,24 @@ typedef struct am_table_short AMTS;
#endif /* !USE_LOCALE_NUMERIC */
-#if defined(USE_LONG_LONG) && defined(HAS_LONG_LONG) && defined(HAS_ATOLL)
-#define Atol atoll
-#else
-#define Atol atol
+#if !defined(Atol) && defined(USE_LONG_LONG) && defined(HAS_LONG_LONG) \
+ && defined(HAS_ATOLL)
+# define Atol atoll
+#endif
+/* is there atoq() anywhere? */
+#if !defined(Atol)
+# define Atol atol /* we assume atol being available anywhere */
#endif
-#if defined(USE_LONG_LONG) && defined(HAS_LONG_LONG) && defined(HAS_STRTOULL)
-#define Strtoul strtoull
-#else
-#define Strtoul strtoul
+#if !defined(Strtoul) && defined(USE_LONG_LONG) && defined(HAS_LONG_LONG) \
+ && defined(HAS_STRTOULL)
+# define Strtoul strtoull
+#endif
+#if !defined(Strtoul) && defined(USE_64_BITS) && defined(HAS_STRTOUQ)
+# define Strtoul strtouq
+#endif
+#if !defined(Strtoul)
+# define Strtoul strtoul /* we assume strtoul being available anywhere */
#endif
#if !defined(PERLIO_IS_STDIO) && defined(HASATTRIBUTE)