summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/date/lib/timelib.m428
1 files changed, 28 insertions, 0 deletions
diff --git a/ext/date/lib/timelib.m4 b/ext/date/lib/timelib.m4
index b99dc0c786..6fd8504efe 100644
--- a/ext/date/lib/timelib.m4
+++ b/ext/date/lib/timelib.m4
@@ -33,6 +33,34 @@ if test "$ac_cv_int_type_$1" = "yes"; then
fi
])dnl
+dnl
+dnl AC_TIMELIB_C_BIGENDIAN
+dnl Replacement macro for AC_C_BIGENDIAN
+dnl
+AC_DEFUN([AC_TIMELIB_C_BIGENDIAN],
+[AC_CACHE_CHECK([whether byte ordering is bigendian], ac_cv_c_bigendian_php,
+ [
+ ac_cv_c_bigendian_php=unknown
+ AC_TRY_RUN(
+ [
+int main(void)
+{
+ short one = 1;
+ char *cp = (char *)&one;
+
+ if (*cp == 0) {
+ return(0);
+ } else {
+ return(1);
+ }
+}
+ ], [ac_cv_c_bigendian_php=yes], [ac_cv_c_bigendian_php=no], [ac_cv_c_bigendian_php=unknown])
+ ])
+ if test $ac_cv_c_bigendian_php = yes; then
+ AC_DEFINE(WORDS_BIGENDIAN, [], [Define if processor uses big-endian word])
+ fi
+])dnl
+
dnl Check for types, sizes, etc. needed by timelib
AC_CHECK_SIZEOF(long, 8)
AC_CHECK_SIZEOF(int, 4)