# endif
#endif
-#if !defined(Perl_atof) && defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
-# if !defined(Perl_atof) && defined(HAS_STRTOLD)
-# define Perl_atof(s) (NV)strtold(s, (char**)NULL)
-# endif
-# if !defined(Perl_atof) && defined(HAS_ATOLF)
-# define Perl_atof (NV)atolf
-# endif
-# if !defined(Perl_atof) && defined(PERL_SCNfldbl)
-# define Perl_atof PERL_SCNfldbl
-# define Perl_atof2(s,f) sscanf((s), "%"PERL_SCNfldbl, &(f))
-# endif
-#endif
-#if !defined(Perl_atof)
-# define Perl_atof atof /* we assume atof being available anywhere */
-#endif
-#if !defined(Perl_atof2)
-# define Perl_atof2(s,f) ((f) = (NV)Perl_atof(s))
-#endif
+#define Perl_atof(s) Perl_my_atof(s)
+#define Perl_atof2(s, np) Perl_my_atof2(s, np)
/* Previously these definitions used hardcoded figures.
* It is hoped these formula are more portable, although
} STMT_END
# endif
-# define DEBUG_f(a) if (DEBUG_f_TEST) a
-# define DEBUG_r(a) if (DEBUG_r_TEST) a
-# define DEBUG_x(a) if (DEBUG_x_TEST) a
-# define DEBUG_u(a) if (DEBUG_u_TEST) a
-# define DEBUG_L(a) if (DEBUG_L_TEST) a
-# define DEBUG_H(a) if (DEBUG_H_TEST) a
-# define DEBUG_X(a) if (DEBUG_X_TEST) a
-# define DEBUG_D(a) if (DEBUG_D_TEST) a
+# define DEBUG__(t, a) \
+ STMT_START { \
+ if (t) STMT_START {a;} STMT_END; \
+ } STMT_END
+
+# define DEBUG_f(a) DEBUG__(DEBUG_f_TEST, a)
+# define DEBUG_r(a) DEBUG__(DEBUG_r_TEST, a)
+# define DEBUG_x(a) DEBUG__(DEBUG_x_TEST, a)
+# define DEBUG_u(a) DEBUG__(DEBUG_u_TEST, a)
+# define DEBUG_L(a) DEBUG__(DEBUG_L_TEST, a)
+# define DEBUG_H(a) DEBUG__(DEBUG_H_TEST, a)
+# define DEBUG_X(a) DEBUG__(DEBUG_X_TEST, a)
+# define DEBUG_D(a) DEBUG__(DEBUG_D_TEST, a)
# ifdef USE_THREADS
-# define DEBUG_S(a) if (DEBUG_S_TEST) a
+# define DEBUG_S(a) DEBUG__(DEBUG_S_TEST, a)
# else
# define DEBUG_S(a)
# endif
-# define DEBUG_T(a) if (DEBUG_T_TEST) a
-# define DEBUG_R(a) if (DEBUG_R_TEST) a
+# define DEBUG_T(a) DEBUG__(DEBUG_T_TEST, a)
+# define DEBUG_R(a) DEBUG__(DEBUG_R_TEST, a)
#else /* DEBUGGING */
#define UNLINK PerlLIO_unlink
#endif
+#ifndef HAS_SETRESUID_PROTO /* some versions of glibc */
+int setresuid(uid_t ruid, uid_t euid, uid_t suid);
+#endif
+#ifndef HAS_SETRESUID_PROTO /* some versions of glibc */
+int setresgid(gid_t rgid, gid_t egid, gid_t sgid);
+#endif
+
#ifndef HAS_SETREUID
# ifdef HAS_SETRESUID
# define setreuid(r,e) setresuid(r,e,(Uid_t)-1)