OSSP CVS Repository

ossp - Check-in [597]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 597
Date: 2001-Aug-02 16:39:15 (local)
2001-Aug-02 14:39:15 (UTC)
User:simons
Branch:
Comment: The configure script will now recognize when any of the 64-bit data types is missing. In this case, the define XDS_HAVE_64_BIT_SUPPORT will not be defined in xds.h; it will be defined otherwise. Depending on whether the define is there or not, the 64-bit engines will not be defined.
Tickets:
Inspections:
Files:
ossp-pkg/xds/configure.ac      1.10 -> 1.11     21 inserted, 19 deleted
ossp-pkg/xds/xds.h.in      1.8 -> 1.9     11 inserted, 3 deleted

ossp-pkg/xds/configure.ac 1.10 -> 1.11

--- configure.ac 2001/08/02 14:18:30     1.10
+++ configure.ac 2001/08/02 14:39:15     1.11
@@ -2,7 +2,7 @@
 
 AC_INIT(libxds)
 AC_PREREQ(2.52)
-AC_REVISION($Revision: 1.10 $)
+AC_REVISION($Revision: 1.11 $)
 
 dnl Get rid of the lousy -g and -O defaults in CFLAGS.
 dnl
@@ -23,42 +23,44 @@
 dnl
 AC_CHECK_TYPE(u_int8_t, [xds_uint8_t=u_int8_t],
               [AC_CHECK_TYPE(uint8_t, [xds_uint8_t=uint8_t],
-                             [AC_MSG_ERROR([no unsigned 8 bit data type found])]
-                            )])
-AC_SUBST([xds_uint8_t])
+                             [AC_MSG_ERROR([no unsigned 8 bit data type found])])])
 AC_CHECK_TYPE(u_int16_t, [xds_uint16_t=u_int16_t],
               [AC_CHECK_TYPE(uint16_t, [xds_uint16_t=uint16_t],
-                             [AC_MSG_ERROR([no unsigned 16 bit data type found])]
-                            )])
-AC_SUBST([xds_uint16_t])
+                             [AC_MSG_ERROR([no unsigned 16 bit data type found])])])
 AC_CHECK_TYPE(u_int32_t, [xds_uint32_t=u_int32_t],
               [AC_CHECK_TYPE(uint32_t, [xds_uint32_t=uint32_t],
-                             [AC_MSG_ERROR([no unsigned 32 bit data type found])]
-                            )])
-AC_SUBST([xds_uint32_t])
+                             [AC_MSG_ERROR([no unsigned 32 bit data type found])])])
 AC_CHECK_TYPE(u_int64_t, [xds_uint64_t=u_int64_t],
               [AC_CHECK_TYPE(uint64_t, [xds_uint64_t=uint64_t],
-                             [AC_MSG_ERROR([no unsigned 64 bit data type found])
-                             ])])
-AC_SUBST([xds_uint64_t])
+                             [AC_MSG_WARN([no unsigned 64 bit data type found])
+                             xds_uint64_t=undefined])])
 dnl
 AC_CHECK_TYPE(int8_t, [xds_int8_t=int8_t],
               [AC_MSG_ERROR([no signed 8 bit data type found])
               ])
-AC_SUBST([xds_int8_t])
 AC_CHECK_TYPE(int16_t, [xds_int16_t=int16_t],
               [AC_MSG_ERROR([no signed 16 bit data type found])
               ])
-AC_SUBST([xds_int16_t])
 AC_CHECK_TYPE(int32_t, [xds_int32_t=int32_t],
               [AC_MSG_ERROR([no signed 32 bit data type found])
               ])
-AC_SUBST([xds_int32_t])
 AC_CHECK_TYPE(int64_t, [xds_int64_t=int64_t],
-              [AC_MSG_ERROR([no signed 64 bit data type found])
-              ])
-AC_SUBST([xds_int64_t])
+              [AC_MSG_WARN([no signed 64 bit data type found])
+              xds_int64_t=undefined])
 dnl
+if test "$xds_int64_t" = "undefined" -o "$xds_uint64_t" = "undefined"; then
+   have_64_bit_support="#undef XDS_HAVE_64_BIT_SUPPORT"
+else
+   have_64_bit_support="#define XDS_HAVE_64_BIT_SUPPORT"
+fi
+AC_SUBST([xds_uint8_t])
+AC_SUBST([xds_uint16_t])
+AC_SUBST([xds_uint32_t])
+AC_SUBST([xds_uint64_t])
+AC_SUBST([xds_int8_t])
+AC_SUBST([xds_int16_t])
+AC_SUBST([xds_int32_t])
+AC_SUBST([xds_int64_t])
 AC_SUBST([have_64_bit_support])
 
 dnl Find the library containing the xdr_xxx() functions.


ossp-pkg/xds/xds.h.in 1.8 -> 1.9

--- xds.h.in     2001/08/02 08:12:26     1.8
+++ xds.h.in     2001/08/02 14:39:15     1.9
@@ -38,14 +38,18 @@
 #define XDS_TRUE (1==1)
 #define XDS_FALSE (1!=1)
 
+@have_64_bit_support@
+
 typedef @xds_uint8_t@ xds_uint8_t;
-typedef @xds_uint16_t@ xds_uint16_t;
-typedef @xds_uint32_t@ xds_uint32_t;
-typedef @xds_uint64_t@ xds_uint64_t;
 typedef @xds_int8_t@ xds_int8_t;
+typedef @xds_uint16_t@ xds_uint16_t;
 typedef @xds_int16_t@ xds_int16_t;
+typedef @xds_uint32_t@ xds_uint32_t;
 typedef @xds_int32_t@ xds_int32_t;
+#ifdef XDS_HAVE_64_BIT_SUPPORT
+typedef @xds_uint64_t@ xds_uint64_t;
 typedef @xds_int64_t@ xds_int64_t;
+#endif
 typedef double xds_double_t;
 
 enum
@@ -126,10 +130,12 @@
 xds_declare_formatting_engine(xdr_decode_uint32);
 xds_declare_formatting_engine(xdr_encode_int32);
 xds_declare_formatting_engine(xdr_decode_int32);
+#ifdef XDS_HAVE_64_BIT_SUPPORT
 xds_declare_formatting_engine(xdr_encode_uint64);
 xds_declare_formatting_engine(xdr_decode_uint64);
 xds_declare_formatting_engine(xdr_encode_int64);
 xds_declare_formatting_engine(xdr_decode_int64);
+#endif
 xds_declare_formatting_engine(xdr_encode_double);
 xds_declare_formatting_engine(xdr_decode_double);
 xds_declare_formatting_engine(xdr_encode_octetstream);
@@ -145,10 +151,12 @@
 xds_declare_formatting_engine(xml_decode_uint32);
 xds_declare_formatting_engine(xml_encode_int32);
 xds_declare_formatting_engine(xml_decode_int32);
+#ifdef XDS_HAVE_64_BIT_SUPPORT
 xds_declare_formatting_engine(xml_encode_uint64);
 xds_declare_formatting_engine(xml_decode_uint64);
 xds_declare_formatting_engine(xml_encode_int64);
 xds_declare_formatting_engine(xml_decode_int64);
+#endif
 xds_declare_formatting_engine(xml_encode_double);
 xds_declare_formatting_engine(xml_decode_double);
 xds_declare_formatting_engine(xml_encode_octetstream);

CVSTrac 2.0.1