Prior to autoconf 2.13, AC_CHECK_TYPE took two arguments, the type
to check and the a default type to use if that type wasn't defined.
This usage has been deprecated since 2.13, and the AC_CHECK_TYPE
macro itself now behaves differently. Whilst there is a compatibility
mode, the autoconf documentation discourages its use.
We also have an occurence of a slightly more modern AC_CHECK_TYPE,
where we explicitly #define a default value if one isn't provided.
The autoconf manual also discourages this form, however, in favour
of using AC_CHECK_TYPES, and placing suitable typedefs in an
external header file.
Modify our code so we do things in the recommended way.
Change-Id: Ie28067f2c90e9a3aa25cfde45ef081da2d380ee1
Reviewed-on: http://gerrit.openafs.org/1914
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
AC_CHECK_SIZEOF(unsigned int)
AC_TYPE_INTPTR_T
AC_TYPE_UINTPTR_T
-AC_CHECK_TYPE(ssize_t, int)
-AC_CHECK_TYPE([sig_atomic_t], ,
- [AC_DEFINE([sig_atomic_t], [int],
- [Define to int if <signal.h> does not define.])],
+AC_CHECK_TYPES([ssize_t])
+AC_CHECK_TYPES([sig_atomic_t],[],[],
[#include <sys/types.h>
#include <signal.h>])
AC_SIZEOF_TYPE(long)
#define MIN_AFS_INT64 (-MAX_AFS_INT64 - 1)
#define MAX_AFS_UINT64 0xFFFFFFFFFFFFFFFFL
+#ifndef HAVE_SSIZE_T
+typedef int ssize_t;
+#endif
+
+#ifndef HAVE_SIG_ATOMIC_T
+typedef int sig_atomic_t;
+#endif
+
typedef short afs_int16;
typedef unsigned short afs_uint16;
#ifdef AFS_64BIT_ENV