]> sjero.net Git - wget/commitdiff
[svn] Change u_int32_t to uint32_t.
authorhniksic <devnull@localhost>
Sun, 26 Oct 2003 01:41:56 +0000 (18:41 -0700)
committerhniksic <devnull@localhost>
Sun, 26 Oct 2003 01:41:56 +0000 (18:41 -0700)
ChangeLog
configure.in
src/ChangeLog
src/config.h.in
src/host.c
src/sysdep.h
windows/config.h.bor
windows/config.h.mingw
windows/config.h.ms

index a077ab18202d7065e8e3f34428396bdb6ce029dd..e25a3a6b3342b5069d20cb0db86193ce9ac2a879 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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.
 2003-10-26  Hrvoje Niksic  <hniksic@xemacs.org>
 
        * windows/Makefile.src.watcom (OBJS): Use convert.c.
index 3f1417c90a87ed8b16ffa86ea6406dd9069d753c..9c026dd6b843dc341a81e8962f2ee270348890ce 100644 (file)
@@ -164,7 +164,8 @@ AC_CHECK_SIZEOF(short)
 AC_CHECK_SIZEOF(int)
 AC_CHECK_SIZEOF(long)
 AC_CHECK_SIZEOF(long long)
 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
 
 dnl
 dnl Checks for headers
index 97eca1fa419c5ace2b1671cf20757b003910fbc7..af97033128cbb4fae9c702999448cde65a1d9ac9 100644 (file)
@@ -1,3 +1,9 @@
+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
 2003-10-26  Hrvoje Niksic  <hniksic@xemacs.org>
 
        * netrc.c (parse_netrc): Reset the QUOTE flag after the closing
index 455f2c8da95e5f50b326a22df922b4d701051e47..c4da0f717811540cde00fde856bc758927355c8c 100644 (file)
@@ -110,6 +110,9 @@ char *alloca ();
 /* Define if you can safely include both <sys/time.h> and <time.h>.  */
 #undef TIME_WITH_SYS_TIME
 
 /* 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
 
 /* Define if you have struct utimbuf.  */
 #undef HAVE_STRUCT_UTIMBUF
 
@@ -275,8 +278,8 @@ char *alloca ();
 /* Defined to int or size_t on systems without socklen_t.  */
 #undef socklen_t
 
 /* 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
 
 /* Some autoconf-unrelated preprocessor magic that cannot be in
    sysdep.h because it must be done before including the system
@@ -290,17 +293,6 @@ char *alloca ();
 # endif
 #endif
 
 # 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
 /* 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
index d0ec76752f3dc4f5a7b830d7400a44714c0df019..5297d0f34347bc5b926d3d35192bf958f48e60c9 100644 (file)
@@ -601,7 +601,7 @@ struct address_list *
 lookup_host (const char *host, int silent)
 {
   struct address_list *al = NULL;
 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
   ip_address addr;
 
   /* First, try to check whether the address is already a numeric
@@ -612,8 +612,8 @@ lookup_host (const char *host, int silent)
     return address_list_from_single (&addr);
 #endif
 
     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.  */
     {
       /* ADDR is defined to be in network byte order, which is what
         this returns, so we can just copy it to STORE_IP.  */
index 7854eafafa17e65e9605f1815aecae2e7fb0672b..f2fecc511dbe7a8fdb6472a68c39815ad38f9e81 100644 (file)
@@ -48,6 +48,10 @@ so, delete this exception statement from your version.  */
 #include <sys/types.h>
 #include <sys/stat.h>
 
 #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
 #ifdef WINDOWS
 /* Windows doesn't have some functions.  Include mswindows.h so we get
    their declarations, as well as some additional declarations and
@@ -245,23 +249,23 @@ void *memcpy ();
 int fnmatch ();
 #endif
 
 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
    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.)  */
 
    (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
 # if SIZEOF_INT == 4
-typedef unsigned int u_int32_t;
+typedef unsigned int uint32_t;
 # else
 #  if SIZEOF_LONG == 4
 # else
 #  if SIZEOF_LONG == 4
-typedef unsigned long u_int32_t;
+typedef unsigned long uint32_t;
 #  else
 #   if SIZEOF_SHORT == 4
 #  else
 #   if SIZEOF_SHORT == 4
-typedef unsigned short u_int32_t;
+typedef unsigned short uint32_t;
 #   else
 #   else
- #error "Cannot determine a 32-bit type"
+ #error "Cannot determine a 32-bit unsigned integer type"
 #   endif
 #  endif
 # endif
 #   endif
 #  endif
 # endif
index f5153dca615087e8b90e8bcb1ac332677bfd543e..2778c109cb6284a49c082ff94f68d3b82bea6b2d 100644 (file)
 /* Defined to int or size_t on systems without socklen_t.  */
 #define socklen_t int
 
 /* 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 */
 
 #endif /* CONFIG_H */
index caf07ae1c0c44ab6235e51502444e30a78d6cb5e..1db10b246d019a61c377e98de9ad748ce3a03073 100644 (file)
@@ -257,7 +257,7 @@ so, delete this exception statement from your version.  */
 /* Defined to int or size_t on systems without socklen_t.  */
 #define socklen_t int
 
 /* 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 */
 
 #endif /* CONFIG_H */
index 15a880acac138fa602659ee90a0f0e67ab69ee63..f57069e2aa0efefdd8d4dc4204b82a039133d5ff 100644 (file)
 /* Defined to int or size_t on systems without socklen_t.  */
 #define socklen_t int
 
 /* 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 */
 
 #endif /* CONFIG_H */