+2003-10-26 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * configure.in: Switch from u_int32_t to uint32_t. Check for
+ inttypes.h so it's used to get the definition of uint32_t where
+ available.
+
2003-10-26 Hrvoje Niksic <hniksic@xemacs.org>
* windows/Makefile.src.watcom (OBJS): Use convert.c.
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
-AC_CHECK_TYPES(u_int32_t)
+AC_CHECK_HEADERS(inttypes.h)
+AC_CHECK_TYPES(uint32_t)
dnl
dnl Checks for headers
+2003-10-26 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * sysdep.h: Include inttypes.h where available.
+
+ * host.c: Switch from u_int32_t to uint32_t.
+
2003-10-26 Hrvoje Niksic <hniksic@xemacs.org>
* netrc.c (parse_netrc): Reset the QUOTE flag after the closing
/* Define if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
+/* Define if you have inttypes.h header. */
+#undef HAVE_INTTYPES_H
+
/* Define if you have struct utimbuf. */
#undef HAVE_STRUCT_UTIMBUF
/* Defined to int or size_t on systems without socklen_t. */
#undef socklen_t
-/* Define if you have u_int32_t. */
-#undef HAVE_U_INT32_T
+/* Define if you have uint32_t. */
+#undef HAVE_UINT32_T
/* Some autoconf-unrelated preprocessor magic that cannot be in
sysdep.h because it must be done before including the system
# endif
#endif
-/* Under Ultrix, u_int32_t is only defined when <sys/bitypes.h> is
- included. Therefore, configure doesn't pick it up, but files that
- include <netdb.h> (or <resolv.h>) fail to compile because it includes
- bitypes.h. This magic define causes netdb.h/resolv.h not to include
- bitypes.h under Ultrix. */
-
-#ifdef __ultrix
-# define BSD 199306
-#endif
-
-
/* The following several lines can be very dangerous; they can cripple
the header files and break compilation in _verY_ non-obvious ways.
Because of that, we define them only on architectures we know
lookup_host (const char *host, int silent)
{
struct address_list *al = NULL;
- u_int32_t addr_ipv4;
+ uint32_t addr_ipv4;
ip_address addr;
/* First, try to check whether the address is already a numeric
return address_list_from_single (&addr);
#endif
- addr_ipv4 = (u_int32_t)inet_addr (host);
- if (addr_ipv4 != (u_int32_t)-1)
+ addr_ipv4 = (uint32_t)inet_addr (host);
+ if (addr_ipv4 != (uint32_t)-1)
{
/* ADDR is defined to be in network byte order, which is what
this returns, so we can just copy it to STORE_IP. */
#include <sys/types.h>
#include <sys/stat.h>
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+
#ifdef WINDOWS
/* Windows doesn't have some functions. Include mswindows.h so we get
their declarations, as well as some additional declarations and
int fnmatch ();
#endif
-/* Provide u_int32_t on the platforms that don't define it. Although
+/* Provide uint32_t on the platforms that don't define it. Although
most code should be agnostic about integer sizes, some code really
- does need a 32-bit integral type. Such code should use u_int32_t.
+ does need a 32-bit integral type. Such code should use uint32_t.
(The exception is gnu-md5.[ch], which uses its own detection for
portability across platforms.) */
-#ifndef HAVE_U_INT32_T
+#ifndef HAVE_UINT32_T
# if SIZEOF_INT == 4
-typedef unsigned int u_int32_t;
+typedef unsigned int uint32_t;
# else
# if SIZEOF_LONG == 4
-typedef unsigned long u_int32_t;
+typedef unsigned long uint32_t;
# else
# if SIZEOF_SHORT == 4
-typedef unsigned short u_int32_t;
+typedef unsigned short uint32_t;
# else
- #error "Cannot determine a 32-bit type"
+ #error "Cannot determine a 32-bit unsigned integer type"
# endif
# endif
# endif
/* Defined to int or size_t on systems without socklen_t. */
#define socklen_t int
-/* Define if you have u_int32_t. */
-/* #undef HAVE_U_INT32_T */
+/* Define if you have uint32_t. */
+#define HAVE_UINT32_T */
#endif /* CONFIG_H */
/* Defined to int or size_t on systems without socklen_t. */
#define socklen_t int
-/* Define if you have u_int32_t. */
-/* #undef HAVE_U_INT32_T */
+/* Define if you have uint32_t. */
+#undef HAVE_UINT32_T
#endif /* CONFIG_H */
/* Defined to int or size_t on systems without socklen_t. */
#define socklen_t int
-/* Define if you have u_int32_t. */
-#undef HAVE_U_INT32_T
+/* Define if you have uint32_t. */
+#define HAVE_UINT32_T
#endif /* CONFIG_H */