Index: lib/config-os400.h
===================================================================
RCS file: /cvsroot/curl/curl/lib/config-os400.h,v
retrieving revision 1.6
diff -u -r1.6 config-os400.h
--- lib/config-os400.h	17 Jul 2008 03:07:54 -0000	1.6
+++ lib/config-os400.h	21 Jul 2008 15:30:35 -0000
@@ -506,3 +506,27 @@
 
 /* Use the system keyring as the default CA bundle. */
 #define CURL_CA_BUNDLE  "/QIBM/UserData/ICSS/Cert/Server/DEFAULT.KDB"
+
+/* ---------------------------------------------------------------- */
+/*                       ADDITIONAL DEFINITIONS                     */
+/* ---------------------------------------------------------------- */
+
+/* The following must be defined BEFORE common header files inclusion. */
+
+#define __ptr128                        /* No teraspace. */
+#define qadrt_use_fputc_inline          /* Generate fputc() wrapper inline. */
+#define qadrt_use_fread_inline          /* Generate fread() wrapper inline. */
+#define qadrt_use_fwrite_inline         /* Generate fwrite() wrapper inline. */
+
+/* OS/400 netdb.h does not define NI_MAXHOST. */
+#define NI_MAXHOST      1025
+
+/* OS/400 netdb.h does not define NI_MAXSERV. */
+#define NI_MAXSERV      32
+
+/* OS/400 does not define the ifr_dstaddr union member. */
+#define ifr_dstaddr     ifr_addr
+
+/* No OS/400 header file defines u_int32_t. */
+typedef unsigned long   u_int32_t;
+
Index: lib/setup-os400.h
===================================================================
RCS file: /cvsroot/curl/curl/lib/setup-os400.h,v
retrieving revision 1.2
diff -u -r1.2 setup-os400.h
--- lib/setup-os400.h	20 May 2008 10:21:50 -0000	1.2
+++ lib/setup-os400.h	21 Jul 2008 15:30:37 -0000
@@ -23,27 +23,6 @@
  * $Id: setup-os400.h,v 1.2 2008-05-20 10:21:50 patrickm Exp $
  ***************************************************************************/
 
-/* The following must be defined BEFORE common header files inclusion. */
-
-#define __ptr128                        /* No teraspace. */
-#define qadrt_use_fputc_inline          /* Generate fputc() wrapper inline. */
-#define qadrt_use_fread_inline          /* Generate fread() wrapper inline. */
-#define qadrt_use_fwrite_inline         /* Generate fwrite() wrapper inline. */
-
-
-/* OS/400 netdb.h does not define NI_MAXHOST. */
-#define NI_MAXHOST      1025
-
-/* OS/400 netdb.h does not define NI_MAXSERV. */
-#define NI_MAXSERV      32
-
-/* OS/400 does not define the ifr_dstaddr union member. */
-#define ifr_dstaddr     ifr_addr
-
-/* No OS/400 header file defines u_int32_t. */
-typedef unsigned long   u_int32_t;
-
-
 /* System API wrapper prototypes and definitions to support ASCII parameters. */
 
 #include <sys/socket.h>
Index: lib/setup.h
===================================================================
RCS file: /cvsroot/curl/curl/lib/setup.h,v
retrieving revision 1.142
diff -u -r1.142 setup.h
--- lib/setup.h	14 Jul 2008 17:31:39 -0000	1.142
+++ lib/setup.h	21 Jul 2008 15:30:37 -0000
@@ -61,8 +61,7 @@
 #endif
 
 #ifdef __OS400__
-#include "config-os400.h"
-#include "setup-os400.h"
+#  include "config-os400.h"
 #endif
 
 #ifdef TPF
@@ -96,6 +95,10 @@
 #  define CURL_DISABLE_FILE
 #endif
 
+#ifdef __OS400__
+#  include "setup-os400.h"
+#endif
+
 /*
  * Include header files for windows builds before redefining anything.
  * Use this preproessor block only to include or exclude windows.h,
