OSSP CVS Repository

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

Check-in Number: 549
Date: 2001-Jul-20 12:42:34 (local)
2001-Jul-20 10:42:34 (UTC)
User:simons
Branch:
Comment: - Renamed configure.in to configure.ac for autoconf 2.50 and later. - Added tests that will find the exact data types and typedef our versions to them.
Tickets:
Inspections:
Files:
ossp-pkg/xds/.cvsignore      1.3 -> 1.4     1 inserted, 1 deleted
ossp-pkg/xds/configure.ac      added-> 1.1
ossp-pkg/xds/configure.in      added-> 1.3
ossp-pkg/xds/xds.h      added-> 1.23
ossp-pkg/xds/xds.h.in      added-> 1.1

ossp-pkg/xds/.cvsignore 1.3 -> 1.4

--- .cvsignore   2001/07/20 10:08:26     1.3
+++ .cvsignore   2001/07/20 10:42:34     1.4
@@ -1,2 +1,2 @@
 xds.3
-Makefile configure
+xds.h Makefile configure


ossp-pkg/xds/configure.ac -> 1.1

*** /dev/null    Sun Apr 28 08:15:38 2024
--- -    Sun Apr 28 08:16:43 2024
***************
*** 0 ****
--- 1,61 ----
+ dnl configure.in -- Process this file with autoconf to produce a configure script.
+ 
+ AC_INIT(libxds, [$Revision: 1.1 $])
+ 
+ dnl Get rid of the lousy -g and -O defaults in CFLAGS.
+ dnl
+ CFLAGS=${CFLAGS:-}
+ 
+ dnl Checks for paths and programs.
+ dnl
+ AC_PROG_CC
+ AC_PROG_RANLIB
+ 
+ dnl Set special flags for gcc.
+ dnl
+ if test "$GCC" = yes; then
+     CFLAGS="$CFLAGS -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wcast-align -Winline -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wno-long-long"
+ fi
+ 
+ dnl Check for exact data types.
+ 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_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_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_CHECK_TYPE(int8_t, [xds_int8_t=int8_t],
+               [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_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_CHECK_TYPE(int32_t, [xds_int32_t=int32_t],
+                             [AC_MSG_ERROR([no signed 32 bit data type found])]
+                             )]
+              )
+ AC_SUBST([xds_int32_t])
+ 
+ dnl Write results.
+ dnl
+ AC_OUTPUT(xds.h Makefile regression-tests/Makefile)


ossp-pkg/xds/configure.in -> 1.3

*** /dev/null    Sun Apr 28 08:15:38 2024
--- -    Sun Apr 28 08:16:43 2024
***************
*** 0 ****
--- 1,22 ----
+ dnl configure.in -- Process this file with autoconf to produce a configure script.
+ 
+ AC_INIT(libxds, [$Revision: 1.3 $])
+ 
+ dnl Get rid of the lousy -g and -O defaults in CFLAGS.
+ dnl
+ CFLAGS=${CFLAGS:-}
+ 
+ dnl Checks for paths and programs.
+ dnl
+ AC_PROG_CC
+ AC_PROG_RANLIB
+ 
+ dnl Set special flags for gcc.
+ dnl
+ if test "$GCC" = yes; then
+     CFLAGS="$CFLAGS -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wcast-align -Winline -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wno-long-long"
+ fi
+ 
+ dnl Write results.
+ dnl
+ AC_OUTPUT(Makefile regression-tests/Makefile)


ossp-pkg/xds/xds.h -> 1.23

*** /dev/null    Sun Apr 28 08:15:38 2024
--- -    Sun Apr 28 08:16:43 2024
***************
*** 0 ****
--- 1,89 ----
+ /*
+    XDS - OSSP Extensible Data Serialization Library
+    Copyright (c) 2001 The OSSP Project (http://www.ossp.org/)
+    Copyright (c) 2001 Cable & Wireless Deutschland (http://www.cw.com/de/)
+ 
+    This file is part of OSSP XDS, an extensible data serialization
+    library which can be found at http://www.ossp.com/pkg/xds/.
+ 
+    Permission to use, copy, modify, and distribute this software for
+    any purpose with or without fee is hereby granted, provided that
+    the above copyright notice and this permission notice appear in all
+    copies.
+ 
+    THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+    WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+    MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+    IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+    CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+    USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+    ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+    OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+    SUCH DAMAGE.
+ 
+    xds.h: C API
+ */
+ 
+ #ifndef __LIBXDS_H__
+ #define __LIBXDS_H__
+ 
+ #include <stdlib.h>
+ #include <stdarg.h>
+ 
+ enum
+     {
+     XDS_OK                 =  0,
+     XDS_ERR_NO_MEM         = -1,
+     XDS_ERR_OVERFLOW       = -2,
+     XDS_ERR_INVALID_ARG    = -3,
+     XDS_ERR_TYPE_MISMATCH  = -4,
+     XDS_ERR_UNKNOWN_ENGINE = -5,
+     XDS_ERR_INVALID_MODE   = -6,
+     XDS_ERR_UNDERFLOW      = -7
+     };
+ typedef enum { XDS_ENCODE, XDS_DECODE } xds_mode_t;
+ typedef enum { XDS_LOAN,   XDS_GIFT   } xds_scope_t;
+ 
+ struct xds_context;
+ typedef struct xds_context xds_t;
+ 
+ typedef int (*xds_engine_t)(xds_t* xds,
+                            void* engine_context,
+                            void* buffer,
+                            size_t buffer_size,
+                            va_list* args);
+ 
+ xds_t* xds_init(xds_mode_t);
+ void xds_destroy(xds_t* xds);
+ 
+ int xds_register(xds_t* xds, const char* name, xds_engine_t engine, void* engine_context);
+ int xds_unregister(xds_t* xds, const char* name);
+ 
+ int xds_setbuffer(xds_t* xds, xds_scope_t flag, void*  buffer, size_t  buffer_len);
+ int xds_getbuffer(xds_t* xds, xds_scope_t flag, void** buffer, size_t* buffer_len);
+ 
+ int xds_encode(xds_t* xds, const char* fmt, ...);
+ int xds_decode(xds_t* xds, const char* fmt, ...);
+ int xds_vencode(xds_t* xds, const char* fmt, va_list args);
+ int xds_vdecode(xds_t* xds, const char* fmt, va_list args);
+ 
+ int xdr_encode_uint32(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args);
+ int xdr_encode_int32(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args);
+ int xdr_encode_uint64(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args);
+ int xdr_encode_int64(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args);
+ 
+ int xdr_decode_uint32(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args);
+ int xdr_decode_int32(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args);
+ int xdr_decode_uint64(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args);
+ int xdr_decode_int64(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args);
+ 
+ int xdr_encode_octetstream(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args);
+ int xdr_decode_octetstream(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args);
+ 
+ int xdr_encode_string(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args);
+ int xdr_decode_string(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args);
+ 
+ #endif /* !defined(__LIBXDS_H__) */


ossp-pkg/xds/xds.h.in -> 1.1

*** /dev/null    Sun Apr 28 08:15:38 2024
--- -    Sun Apr 28 08:16:43 2024
***************
*** 0 ****
--- 1,97 ----
+ /*
+    XDS - OSSP Extensible Data Serialization Library
+    Copyright (c) 2001 The OSSP Project (http://www.ossp.org/)
+    Copyright (c) 2001 Cable & Wireless Deutschland (http://www.cw.com/de/)
+ 
+    This file is part of OSSP XDS, an extensible data serialization
+    library which can be found at http://www.ossp.com/pkg/xds/.
+ 
+    Permission to use, copy, modify, and distribute this software for
+    any purpose with or without fee is hereby granted, provided that
+    the above copyright notice and this permission notice appear in all
+    copies.
+ 
+    THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+    WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+    MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+    IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+    CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+    USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+    ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+    OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+    SUCH DAMAGE.
+ 
+    xds.h: C API
+ */
+ 
+ #ifndef __LIBXDS_H__
+ #define __LIBXDS_H__
+ 
+ #include <stdlib.h>
+ #include <stdarg.h>
+ #include <sys/types.h>
+ 
+ typedef @xds_uint8_t@ xds_uint8_t;
+ typedef @xds_uint16_t@ xds_uint16_t;
+ typedef @xds_uint32_t@ xds_uint32_t;
+ typedef @xds_int8_t@ xds_int8_t;
+ typedef @xds_int16_t@ xds_int16_t;
+ typedef @xds_int32_t@ xds_int32_t;
+ 
+ enum
+     {
+     XDS_OK                 =  0,
+     XDS_ERR_NO_MEM         = -1,
+     XDS_ERR_OVERFLOW       = -2,
+     XDS_ERR_INVALID_ARG    = -3,
+     XDS_ERR_TYPE_MISMATCH  = -4,
+     XDS_ERR_UNKNOWN_ENGINE = -5,
+     XDS_ERR_INVALID_MODE   = -6,
+     XDS_ERR_UNDERFLOW      = -7
+     };
+ typedef enum { XDS_ENCODE, XDS_DECODE } xds_mode_t;
+ typedef enum { XDS_LOAN,   XDS_GIFT   } xds_scope_t;
+ 
+ struct xds_context;
+ typedef struct xds_context xds_t;
+ 
+ typedef int (*xds_engine_t)(xds_t* xds,
+                            void* engine_context,
+                            void* buffer,
+                            size_t buffer_size,
+                            va_list* args);
+ 
+ xds_t* xds_init(xds_mode_t);
+ void xds_destroy(xds_t* xds);
+ 
+ int xds_register(xds_t* xds, const char* name, xds_engine_t engine, void* engine_context);
+ int xds_unregister(xds_t* xds, const char* name);
+ 
+ int xds_setbuffer(xds_t* xds, xds_scope_t flag, void*  buffer, size_t  buffer_len);
+ int xds_getbuffer(xds_t* xds, xds_scope_t flag, void** buffer, size_t* buffer_len);
+ 
+ int xds_encode(xds_t* xds, const char* fmt, ...);
+ int xds_decode(xds_t* xds, const char* fmt, ...);
+ int xds_vencode(xds_t* xds, const char* fmt, va_list args);
+ int xds_vdecode(xds_t* xds, const char* fmt, va_list args);
+ 
+ int xdr_encode_uint32(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args);
+ int xdr_encode_int32(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args);
+ int xdr_encode_uint64(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args);
+ int xdr_encode_int64(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args);
+ 
+ int xdr_decode_uint32(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args);
+ int xdr_decode_int32(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args);
+ int xdr_decode_uint64(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args);
+ int xdr_decode_int64(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args);
+ 
+ int xdr_encode_octetstream(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args);
+ int xdr_decode_octetstream(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args);
+ 
+ int xdr_encode_string(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args);
+ int xdr_decode_string(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args);
+ 
+ #endif /* !defined(__LIBXDS_H__) */

CVSTrac 2.0.1