bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Common C++ for QNX 6 operating system


From: Henrik W Maier
Subject: Common C++ for QNX 6 operating system
Date: Wed, 09 Jul 2003 11:52:19 +1000

Hello!

Thank you for providing and maintaining this useful library.

I build commoncpp2-1.0.12 for QNX 6.

I had to amend three files (persist.h, serial.cpp amd config.h.in, 
all attached) to get Common C++ compiled for QNX 6. 

All changes are marked with a line comment of the form:
// HM: ...

The changes can be added to the code mainstream of the library.

With kind regards,

Henrik W Maier
FOCUS Software Engineering Pty Ltd


______________________________________

   FOCUS Software Engineering Pty Ltd
   Brisbane, Australia           
   Phone  +61 (0)7-3878 5693
   Mobile +61 (0)402-970 933
   Fax  +61 (0)7-3009 0399
   mailto:address@hidden
   http://www.focus-sw.com
______________________________________


/* include/config.h.in.  Generated from configure.in by autoheader.  */
/*
** This file has been automatically generated by 'acconfig' from aclocal.m4
** Copyright (C) 1988 Eleftherios Gkioulekas <address@hidden>
**
** This file is free software; as a special exception the author gives
** unlimited permission to copy and/or distribute it, with or without
** modifications, as long as this notice is preserved.
**
** This program is distributed in the hope that it will be useful, but
** WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/

#ifndef CCXX_CONFIG_H_
#define CCXX_CONFIG_H_

#if defined(__APPLE__) && defined(__MACH__)
#define MACOSX
#define _PTHREADS 1
#endif

#if defined(__FreeBSD__)
#define __BSD_VISIBLE 1
#endif

/* This is the top section */

/* This is the template section */

/* And now the rest of the boys */
#define __DLL
#define __EXPORT
#define __DLLRTL
/* FIXME: old macro, should be removed */
#define __MEMBER_EXPORT
#undef CCXX_EMPTY
#define CCXX_EMPTY
#define CCXX_EXPORT(t) t
#define CCXX_MEMBER(t) t
#define CCXX_MEMBER_EXPORT(t) t
#define CCXX_CLASS_EXPORT
#undef HAVE_ENDIAN_H
#undef __BYTE_ORDER
#undef WITH_LINUXTHREADS
#undef HAVE_SYS_FCNTL_H
#undef HAVE_FCNTL_H
#undef HAVE_SYS_TYPES_STD
#undef HAVE_SYS_TYPES_64
#undef HAVE_LONG_LONG
#undef HAVE_64_BITS
#undef HAVE_SYS_TYPES_H
#undef HAVE_SIGWAIT
#undef HAVE_SIGWAIT2
#undef HAVE_SIGACTION
#undef HAVE_BSD_SIGNAL_H
#undef HAVE_SETITIMER
#undef HAVE_STRCASECMP
#undef HAVE_STRDUP
#undef HAVE_SHL_LOAD
#undef HAVE_MACH_DYLD
#undef HAVE_MEMMOVE
#undef HAVE_STRINGS_H
#undef HAVE_GETOPT_LONG
#undef HAVE_GETOPT_H
#undef HAVE_DLOPEN
#undef HAVE_MODULES
#undef HAVE_DLFCN_H
#undef HAVE_SCHED_GETSCHEDULER
#undef PTHREAD_MUTEXTYPE_RECURSIVE
#undef HAVE_PTHREAD_SUSPEND
#undef HAVE_PTHREAD_MUTEXATTR_SETTYPE
#undef HAVE_PTHREAD_MUTEXATTR_SETTYPE_NP
#undef HAVE_PTHREAD_MUTEXATTR_SETKIND_NP
#undef HAVE_PTHREAD_ATTR_SETSTACKSIZE
#undef HAVE_PTHREAD_DELAY_NP
#undef HAVE_PTHREAD_SCHED_YIELD
#undef HAVE_PTHREAD_YIELD
#undef HAVE_PTHREAD_NANOSLEEP
#undef HAVE_PTHREAD_CANCEL
#undef HAVE_PTHREAD_SETCANCELTYPE
#undef HAVE_PTHREAD_SETCANCEL
#undef HAVE_PTHREAD_RWLOCK
#undef HAVE_PREAD_PWRITE
#undef HAVE_SYS_ATOMIC_H
#undef HAVE_WORKING_SYS_ATOMIC_H
#undef HAVE_SEMAPHORE_H
#undef COMMON_AIX_FIXES
#undef HAVE_FEATURES_H
#undef HAVE_SYS_TIME_H
#undef TIME_WITH_SYS_TIME
#undef HAVE_STRTOK_R
#undef HAVE_LOCALTIME_R
#undef HAVE_SETENV
#define _POSIX_PII_SOCKET
#undef HAVE_SYS_SOCKET_H
#undef HAVE_ARPA_INET_H
#undef HAVE_NETINET_IN_SYSTM_H
#undef HAVE_NETINET_IP_H
#undef HAVE_SYS_UN_H
#undef HAVE_SELECT_H
#undef HAVE_SYS_SELECT_H
#undef HAVE_INET_ATON
#undef HAVE_INET_SOCKETS
#undef HAVE_UNIX_SOCKETS
#undef HAVE_SOCKLEN_T
#undef HAVE_SYS_LIBCSYS_H
#undef HAVE_SYS_STREAM_H
#undef HAVE_SYS_POLL_H
#undef HAVE_POLL_H
#undef HAVE_ZLIB_H
#undef HAVE_LIBXML
#undef COMMON_MEMORY_AUDIT
#undef COMMON_XML_PARSING
#undef COMMON_FTP_SUPPORT
#undef CCXX_HAVE_NEW_INIT
#undef HAVE_OLD_IOSTREAM
#undef CCXX_NAMESPACES
#undef HAVE_BOOL_TYPE
#undef HAVE_EXCEPTION_HANDLING
#undef HAVE_EXCEPTION
#undef COMMON_SECURE
#undef HAVE_SS_H
#undef CYGWIN_IMPORTS


/* Define to 1 if you have the <arpa/inet.h> header file. */
#undef HAVE_ARPA_INET_H

/* Define to 1 if you have the <bsd/signal.h> header file. */
#undef HAVE_BSD_SIGNAL_H

/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H

/* Define to 1 if you have the <exception> header file. */
#undef HAVE_EXCEPTION

/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H

/* Define to 1 if you have the <features.h> header file. */
#undef HAVE_FEATURES_H

/* Define to 1 if you have the `getopt' function. */
#undef HAVE_GETOPT

/* Define to 1 if you have the <getopt.h> header file. */
#undef HAVE_GETOPT_H

/* Define to 1 if you have the `getopt_long' function. */
#undef HAVE_GETOPT_LONG

/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H

/* Define to 1 if you have the `malloc' library (-lmalloc). */
#undef HAVE_LIBMALLOC

/* Define to 1 if you have the <mach-o/dyld.h> header file. */
#undef HAVE_MACH_O_DYLD_H

/* Define to 1 if you have the `memmove' function. */
#undef HAVE_MEMMOVE

/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H

/* Define to 1 if you have the <netinet/in_systm.h> header file. */
#undef HAVE_NETINET_IN_SYSTM_H

/* Define to 1 if you have the <netinet/ip.h> header file. */
#undef HAVE_NETINET_IP_H

/* Define to 1 if you have the `poll' function. */
#undef HAVE_POLL

/* Define to 1 if you have the <poll.h> header file. */
#undef HAVE_POLL_H

/* Define to 1 if you have the <posix_evlog.h> header file. */
#undef HAVE_POSIX_EVLOG_H

/* Define to 1 if you have the <pthread.h> header file. */
#undef HAVE_PTHREAD_H

/* Define to 1 if you have the <pthread_np.h> header file. */
#undef HAVE_PTHREAD_NP_H

/* Define to 1 if you have the `sched_getscheduler' function. */
#undef HAVE_SCHED_GETSCHEDULER

/* Define to 1 if you have the <sched.h> header file. */
#undef HAVE_SCHED_H

/* Define to 1 if you have the <select.h> header file. */
#undef HAVE_SELECT_H

/* Define to 1 if you have the <semaphore.h> header file. */
#undef HAVE_SEMAPHORE_H

/* Define to 1 if you have the `setenv' function. */
#undef HAVE_SETENV

/* Define to 1 if you have the `setitimer' function. */
#undef HAVE_SETITIMER

/* Define to 1 if you have the `sigaction' function. */
#undef HAVE_SIGACTION

/* Define to 1 if you have the `sigwait' function. */
#undef HAVE_SIGWAIT

/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF

/* Define to 1 if you have the <sstream> header file. */
#undef HAVE_SSTREAM

/* Define to 1 if you have the <ss.h> header file. */
#undef HAVE_SS_H

/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H

/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H

/* Define to 1 if you have the `strcasecmp' function. */
#undef HAVE_STRCASECMP

/* Define to 1 if you have the `strdup' function. */
#undef HAVE_STRDUP

/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H

/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H

/* Define to 1 if you have the <syslog.h> header file. */
#undef HAVE_SYSLOG_H

/* Define to 1 if you have the <sys/atomic.h> header file. */
#undef HAVE_SYS_ATOMIC_H

/* Define to 1 if you have the <sys/fcntl.h> header file. */
#undef HAVE_SYS_FCNTL_H

/* Define to 1 if you have the <sys/file.h> header file. */
#undef HAVE_SYS_FILE_H

/* Define to 1 if you have the <sys/libcsys.h> header file. */
#undef HAVE_SYS_LIBCSYS_H

/* Define to 1 if you have the <sys/lockf.h> header file. */
#undef HAVE_SYS_LOCKF_H

/* Define to 1 if you have the <sys/poll.h> header file. */
#undef HAVE_SYS_POLL_H

/* Define to 1 if you have the <sys/sched.h> header file. */
#undef HAVE_SYS_SCHED_H

/* Define to 1 if you have the <sys/select.h> header file. */
#undef HAVE_SYS_SELECT_H

/* Define to 1 if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H

/* Define to 1 if you have the <sys/sockio.h> header file. */
#undef HAVE_SYS_SOCKIO_H

/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H

/* Define to 1 if you have the <sys/stream.h> header file. */
#undef HAVE_SYS_STREAM_H

/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H

/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H

/* Define to 1 if you have the <sys/un.h> header file. */
#undef HAVE_SYS_UN_H

/* Define to 1 if you have the <thread.h> header file. */
#undef HAVE_THREAD_H

/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H

/* Define to 1 if you have the <winsock.h> header file. */
#undef HAVE_WINSOCK_H

/* Define to 1 if you have the <zlib.h> header file. */
#undef HAVE_ZLIB_H

/* Name of package */
#undef PACKAGE

/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT

/* Define to the full name of this package. */
#undef PACKAGE_NAME

/* Define to the full name and version of this package. */
#undef PACKAGE_STRING

/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME

/* Define to the version of this package. */
#undef PACKAGE_VERSION

/* Define as the return type of signal handlers (`int' or `void'). */
#undef RETSIGTYPE

/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS

/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME

/* Version number of package */
#undef VERSION

/* Define to 1 if on MINIX. */
#undef _MINIX

/* Define to 2 if the system does not provide POSIX.1 features except with
   this defined. */
#undef _POSIX_1_SOURCE

/* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE

#define COMMON_ASYNC_OVERRIDE
#define COMMON_OST_NAMESPACE
#define COMMON_THREAD_SLEEP
#define COMMON_NET_DEVICES

#ifdef _AIX
#ifndef _ALL_SOURCE
#define _ALL_SOURCE
#endif
#ifdef  HAVE_PTHREAD_SUSPEND
#undef  HAVE_PTHREAD_SUSPEND
#endif
#endif

#ifndef _REENTRANT
#define _REENTRANT 1
#endif
#ifndef _THREAD_SAFE
#define _THREAD_SAFE 1
#endif
#ifndef _GNU_SOURCE
#define _GNU_SOURCE 1
#endif
#ifdef __QNX__ // HM: QNX added
#ifndef _QNX_SOURCE
#define _QNX_SOURCE
#endif
#endif
#if     !defined(_XOPEN_SOURCE) && !defined(__FreeBSD__) && !defined(__QNX__) 
// HM: QNX added
#define _XOPEN_SOURCE 500
#endif
// Cause problem with Solaris... and perhaps Digital Unix?
// However, the autoconf test in ost_signal defines _POSIX_PTHREAD_SEMANTICS
// when trying to compile sigwait2.
#ifdef  HAVE_SIGWAIT2
#define _POSIX_PTHREAD_SEMANTICS
#endif

#ifdef  __hpux
#ifdef  HAVE_ARPA_INET_H
#include <netinet/inet.h>
#endif
#ifndef _XOPEN_SOURCE_EXTENDED
#define _XOPEN_SOURCE_EXTENDED
#endif
#ifdef  mutable
#undef  mutable
#endif
#endif

#ifdef  HAVE_FEATURES_H
#include <features.h>
#endif

/* This is the bottom section */

#ifdef HAVE_ENDIAN_H
#include <endian.h>
#else
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
#endif


#if defined(__sun) || defined(__SUN__)
#define __EXTENSIONS__ 1
#endif

#ifndef HAVE_FCNTL_H
#ifdef HAVE_SYS_FCNTL_H
#include <sys/fcntl.h>
#endif
#else
#include <fcntl.h>
#ifndef O_NDELAY
#ifdef HAVE_SYS_FCNTL_H
#include <sys/fcntl.h>
#endif
#endif
#endif

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif


#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TYPES_STD
typedef int8_t int8;
typedef u_int8_t uint8;
typedef int16_t int16;
typedef u_int16_t uint16;
typedef int32_t int32;
typedef u_int32_t uint32;
#ifdef HAVE_SYS_TYPES_64
#define HAVE_64_BITS
typedef int64_t int64;
typedef u_int64_t uint64;
#endif
#else
typedef char int8;
typedef unsigned char uint8;
typedef short int16;
typedef unsigned short uint16;
typedef int int32;
typedef unsigned int uint32;
#endif
#ifndef HAVE_SYS_TYPES_64
#if defined(HAVE_LONG_LONG) || defined(_LONGLONG)
#define HAVE_64_BITS
typedef long long int64;
typedef unsigned long long uint64;
#else
#ifdef __arch64__
#define HAVE_64_BITS
typedef long int int64;
typedef unsigned long int uint64;
#endif
#endif
#endif

#ifdef  HAVE_SS_H
#include <ss.h>
#define COMMON_SECURE
#endif

#ifdef HAVE_SIGACTION
#ifdef HAVE_BSD_SIGNAL_H
#undef HAVE_BSD_SIGNAL_H
#endif
#endif

#ifdef HAVE_BSD_SIGNAL_H
#include <bsd/signal.h>
#else
#include <signal.h>
#endif

#ifndef SA_ONESHOT
#define SA_ONESHOT SA_RESETHAND
#endif


#include <string.h>
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif

#ifndef HAVE_MEMMOVE
#define memmove(d, s, l)        memcpy(d, s, l)
#endif

#ifdef HAVE_STRCASECMP
#ifndef stricmp
#define stricmp(x,y) strcasecmp(x,y)
#endif
#ifndef strnicmp
#define strnicmp(x,y,n) strncasecmp(x,y,n)
#endif
#endif

#ifndef HAVE_STRDUP
#define strdup(s) (char *)malloc(strlen(s))
#endif




#ifdef HAVE_THREAD_H
#include "@thrprefix@/thread.h"
#if defined(i386) && defined(__svr4__) && !defined(__sun)
#define _THR_UNIXWARE
#endif
#if defined(__SVR4) && defined(__sun)
#define _THR_SUNOS5
#else
#if defined(__SVR4__) && defined(__SUN__)
#define _THR_SUNOS5
#endif
#endif
#endif

#ifdef HAVE_WORKING_SYS_ATOMIC_H
#include <sys/atomic.h>
#define HAVE_ATOMIC
#endif

#if defined(HAVE_PTHREAD_H) && ( defined(_THREAD_SAFE) || defined(_REENTRANT) )

#include <pthread.h>

#ifdef HAVE_PTHREAD_NP_H
#include <pthread_np.h>
#endif

#ifdef HAVE_SEMAPHORE_H
#include <semaphore.h>
#endif
#ifdef _POSIX_PRIORITY_SCHEDULING
#ifdef HAVE_SCHED_H
#include <sched.h>
#else
#ifdef HAVE_SYS_SCHED_H
#include <sys/sched.h>
#endif
#endif
#endif

#define __PTHREAD_H__
#ifndef PTHREAD_MUTEXTYPE_RECURSIVE
#ifdef  MUTEX_TYPE_COUNTING_FAST
#define PTHREAD_MUTEXTYPE_RECURSIVE MUTEX_TYPE_COUNTING_FAST
#endif
#endif
#ifndef PTHREAD_MUTEXTYPE_RECURSIVE
#ifdef  PTHREAD_MUTEX_RECURSIVE
#define PTHREAD_MUTEXTYPE_RECURSIVE PTHREAD_MUTEX_RECURSIVE
#endif
#endif
#ifndef HAVE_PTHREAD_MUTEXATTR_SETTYPE
#if     HAVE_PTHREAD_MUTEXATTR_SETKIND_NP
#ifndef PTHREAD_MUTEXTYPE_RECURSIVE
#define PTHREAD_MUTEXTYPE_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP
#endif
#define pthread_mutexattr_gettype(x, y) pthread_mutexattr_getkind_np(x, y)
#define pthread_mutexattr_settype(x, y) pthread_mutexattr_setkind_np(x, y)
#endif
#if     HAVE_PTHREAD_MUTEXATTR_SETTYPE_NP
#ifndef PTHREAD_MUTEXTYPE_RECURSIVE
#define PTHREAD_MUTEXTYPE_RECURSIVE PTHREAD_MUTEXTYPE_RECURSIVE_NP
#endif
#define pthread_mutexattr_settype(x, y) pthread_mutexattr_settype_np(x, y)
#define pthread_mutexattr_gettype(x, y) pthread_mutexattr_gettype_np(x, y)
#endif
#endif

#ifndef HAVE_PTHREAD_YIELD
#ifdef HAVE_PTHREAD_SCHED_YIELD
#define pthread_yield() sched_yield()
#define HAVE_PTHREAD_YIELD
#endif
#endif

#ifndef HAVE_PTHREAD_DELAY
#ifdef HAVE_PTHREAD_DELAY_NP
#define HAVE_PTHREAD_DELAY
#define pthread_delay(x) pthread_delay_np(x)
#endif
#ifdef HAVE_PTHREAD_NANOSLEEP
#ifndef HAVE_PTHREAD_DELAY
#define HAVE_PTHREAD_DELAY
#ifdef __FreeBSD__
extern "C" int nanosleep(const struct timespec *rqtp, struct timespec *rmtp);
#endif
#define pthread_delay(x) nanosleep(x, NULL)
#endif
#endif
#endif

#ifdef HAVE_PTHREAD_ATTR_SETSTACK
#ifndef PTHREAD_STACK_MIN
#define PTHREAD_STACK_MIN 32768
#endif
#endif

#ifndef HAVE_PTHREAD_CANCEL
#ifdef SIGCANCEL
#define CCXX_SIG_THREAD_CANCEL SIGCANCEL
#else
#define CCXX_SIG_THREAD_CANCEL SIGQUIT
#endif
#define pthread_cancel(x) pthread_kill(x, CCXX_SIG_THREAD_CANCEL)
#endif

#ifndef HAVE_PTHREAD_SETCANCELTYPE
#ifdef HAVE_PTHREAD_SETCANCEL
enum
{ PTHREAD_CANCEL_ASYNCHRONOUS = CANCEL_ON,
  PTHREAD_CANCEL_DEFERRED = CANCEL_OFF};
enum
{ PTHREAD_CANCEL_ENABLE = CANCEL_ON,
  PTHREAD_CANCEL_DISABLE = CANCEL_OFF};
#define pthread_setcancelstate(x, y) \
        (y == NULL) ? pthread_setcancel(x) : *y = pthread_setcancel
#define pthread_setcanceltype(x, y) \
        (y == NULL) ? pthread_setasynccancel(x) | *y = pthread_setasynccancel(x)
#else
#define pthread_setcanceltype(x, y)
#define pthread_setcancelstate(x, y)
#endif
#endif

#endif


#if TIME_WITH_SYS_TIME
#include <sys/time.h>
#include <time.h>
#else
#if HAVE_SYS_TIME_H
#include <sys/time.h>
#else
#include <time.h>
#endif
#endif


#ifndef HAVE_STRTOK_R
#define strtok_r(s, d, r) strtok(s, d)
#endif

#ifndef HAVE_LOCALTIME_R
#define localtime_r(t, b) localtime(t)
#define ctime_r(t, b) ctime(t)
#define gmtime_r(t, b) gmtime(t)
#define asctime_r(t, b) asctime(t)
#endif


#ifdef HAVE_SYS_LIBCSYS_H
#include <sys/libcsys.h>
#endif

#ifdef HAVE_WINSOCK_H
#include <winsock.h>
#else
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#ifdef HAVE_SELECT_H
#include <select.h>
#else
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#endif
#ifdef HAVE_ARPA_INET_H
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#endif
#ifdef HAVE_NETINET_IN_SYSTM_H
#include <netinet/in_systm.h>
#endif
#ifdef HAVE_NETINET_IP_H
#include <netinet/ip.h>
#endif
#ifdef HAVE_SYS_UN_H
#include <sys/un.h>
#endif
#endif
#endif

#ifndef HAVE_INET_ATON
#define inet_aton(cp, addr) \
        (((*(unsigned long int *)(addr)) = inet_addr(cp)) != -1)
#endif

#ifndef SUN_LEN
#ifdef SCM_RIGHTS
#define HAVE_UN_LEN
#endif
#ifdef __linux__
#define HAVE_UN_LEN
#endif
#ifdef HAVE_UN_LEN
#define SUN_LEN(ptr) sizeof(sockaddr_un.sun_len) + \
        sizeof(sockaddr_un.sun_family) + sizeof(sockaddr_un.sun_path) + 1
#else
#define SUN_LEN(ptr) ((size_t)((struct sockaddr_un *)0)->sun_path) \
        + strlen((ptr)->sun_path))
#endif
#endif

#ifndef HAVE_SOCKLEN_T
#if defined(i386) && defined(__svr4__)
#define HAVE_SOCKLEN_U
#else
#if defined(__CYGWIN32__)
#define socklen_t int
#else
typedef int socklen_t;
#endif
#endif

#ifdef HAVE_SOCKLEN_U
#if !defined(__CYGWIN32__) && !defined(__MINGW32__)
typedef unsigned socklen_t;
#else
typedef int socklen_t;
#endif
#endif
#endif

#ifdef HAVE_POLL_H
#include <poll.h>
#else
#ifdef HAVE_SYS_POLL_H
#include <sys/poll.h>
#endif
#endif

/**
 ** define these after the last system header has been included
 ** so that these do not interfere with them.
 **/

// Add bool support if missing
#ifndef HAVE_BOOL_TYPE
typedef enum { true=1, false=0 } bool;
#endif

// replace 'throw' with abort for libs on broken C++
#ifndef HAVE_EXCEPTION_HANDLING
/* disable HAVE_EXCEPTION */
#ifdef  HAVE_EXCEPTION
#undef  HAVE_EXCEPTION
#endif
/* throw - replacement to throw an exception */
#define THROW(x) abort()
/* throw - replacement to declare an exception */
#define THROWS(x)
/*
 * work around dangeling if/else combinations:
 */
#define try if(0) ; else
#define catch(x) if(1) ; else
#else
#define THROW(x) throw x
#define THROWS(x) throw(x)
#endif

#ifdef CCXX_NAMESPACES
#define USING(x) using namespace x;
#else
#define USING(x)
#endif

#ifdef  __KCC
#define KAI_NONSTD_IOSTREAM 1
#endif

#ifdef __FreeBSD__
#define ETC_PREFIX "@USR_PREFIX@/etc/"
#endif

#ifndef ETC_PREFIX
#define ETC_PREFIX "/etc/"
#endif

#ifdef  _MSC_VER
#pragma warning ( disable : 4335 ) // 'this' used in base init
#endif

#endif
The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any other MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File:  serial.cpp
     Date:  9 Jul 2003, 2:13
     Size:  29510 bytes.
     Type:  Program-source

Attachment: serial.cpp
Description: Binary data

The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any other MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File:  persist.h
     Date:  8 Jul 2003, 22:55
     Size:  17820 bytes.
     Type:  Program-source

Attachment: persist.h
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]