bc_machdefs.h

Go to the documentation of this file.
00001 /****************************************************************************/
00002 /*                                                                          */
00003 /*  This file is part of CONCORDE                                           */
00004 /*                                                                          */
00005 /*  (c) Copyright 1995--1999 by David Applegate, Robert Bixby,              */
00006 /*  Vasek Chvatal, and William Cook                                         */
00007 /*                                                                          */
00008 /*  Permission is granted for academic research use.  For other uses,       */
00009 /*  contact the authors for licensing options.                              */
00010 /*                                                                          */
00011 /*  Use at your own risk.  We make no guarantees about the                  */
00012 /*  correctness or usefulness of this code.                                 */
00013 /*                                                                          */
00014 /****************************************************************************/
00015 
00016 #ifndef __MACHDEFS_H
00017 #define __MACHDEFS_H
00018 
00019 #define NDEBUG
00020 
00021 #include "bc_config.h"
00022 
00023 #ifdef CC_POSIXTHREADS
00024 #ifdef CC_SIGNAL_BEFORE_PTHREAD
00025 #include <signal.h>
00026 #endif
00027 #include <pthread.h>
00028 #endif
00029 
00030 #include <stdio.h>
00031 
00032 #ifdef HAVE_STDLIB_H
00033 # include <stdlib.h>
00034 #endif
00035 #ifdef HAVE_MATH_H
00036 # include <math.h>
00037 #endif
00038 #ifdef HAVE_STRING_H
00039 # include <string.h>
00040 #else
00041 # ifdef HAVE_STRINGS_H
00042 #  include <strings.h>
00043 # endif
00044 #endif
00045 #ifdef HAVE_ERRNO_H
00046 # include <errno.h>
00047 #endif
00048 #ifdef HAVE_ASSERT_H
00049 # include <assert.h>
00050 #endif
00051 #ifdef TIME_WITH_SYS_TIME
00052 # include <sys/time.h>
00053 # include <time.h>
00054 #else
00055 # ifdef HAVE_SYS_TIME_H
00056 #  include <sys/time.h>
00057 # else
00058 #  ifdef HAVE_TIME_H
00059 #   include <time.h>
00060 #  endif
00061 # endif
00062 #endif
00063 #ifdef HAVE_STDDEF_H
00064 # include <stddef.h>
00065 #endif
00066 #ifdef HAVE_UNISTD_H
00067 # include <unistd.h>
00068 #endif
00069 #ifdef HAVE_MALLOC_H
00070 # include <malloc.h>
00071 #endif
00072 #ifdef HAVE_SYS_TYPES_H
00073 # include <sys/types.h>
00074 #endif
00075 #ifdef HAVE_SYS_STAT_H
00076 # include <sys/stat.h>
00077 #endif
00078 #ifdef HAVE_SYS_RESOURCE_H
00079 # include <sys/resource.h>
00080 #endif
00081 #ifdef HAVE_FCNTL_H
00082 # include <fcntl.h>
00083 #endif
00084 #ifdef HAVE_SIGNAL_H
00085 # include <signal.h>
00086 #endif
00087 #ifdef HAVE_SYS_SOCKET_H
00088 # include <sys/socket.h>
00089 #endif
00090 #ifdef HAVE_NETDB_H
00091 # include <netdb.h>
00092 #endif
00093 #ifdef HAVE_NETINET_IN_H
00094 # include <netinet/in.h>
00095 #endif
00096 
00097 #ifdef HAVE_SOCKET
00098 #define CC_NETREADY
00099 #endif
00100 
00101 #ifdef CC_ATTRIBUTE
00102 #define CC_UNUSED __attribute__ ((unused))
00103 #else
00104 #define CC_UNUSED
00105 #endif
00106 
00107 #ifdef CC_PROTO_PRINTF
00108 /* assume that if you're missing printf, you're missing a bunch */
00109 extern int printf (const char *,
00110                    ...),
00111   fprintf (FILE *,
00112            const char *,
00113            ...),
00114   fflush (FILE *),
00115   scanf (const char *,
00116          ...),
00117   sscanf (const char *,
00118           const char *,
00119           ...),
00120   fscanf (FILE *,
00121           const char *,
00122           ...),
00123   fclose (FILE *),
00124   ungetc (int,
00125           FILE *),
00126   _filbuf (FILE *),
00127   time (int *);
00128 #ifdef CC_NETREADY
00129 extern int socket (int,
00130                    int,
00131                    int),
00132   connect (int,
00133            const struct sockaddr *,
00134            int),
00135   accept (int,
00136           struct sockaddr *,
00137           int *),
00138   bind (int,
00139         const struct sockaddr *,
00140         int),
00141   listen (int,
00142           int);
00143 #endif
00144 extern void *memset (void *,
00145                      int,
00146                      size_t),
00147   perror (const char *);
00148 #endif
00149 
00150 #ifdef CC_PROTO_RENAME
00151 extern int rename (const char *,
00152                    const char *);
00153 #endif
00154 
00155 #ifdef CC_PROTO_GETHOSTNAME
00156 extern int gethostname (char *,
00157                         int);
00158 #endif
00159 
00160 #ifdef CC_PROTO_GETRUSAGE
00161 extern int getrusage (int,
00162                       struct rusage *);
00163 #endif
00164 
00165 #ifdef CC_PROTO___VFORK
00166 extern pid_t __vfork (void);
00167 #endif
00168 
00169 #ifndef NULL
00170 #define NULL (0)
00171 #endif
00172 
00173 #ifndef INT_MAX
00174 #define INT_MAX ((int) (~(((unsigned) 1) << ((8*sizeof(int))-1))))
00175 #endif
00176 
00177 #ifndef M_PI
00178 #define M_PI 3.14159265358979323846
00179 #endif
00180 
00181 #ifndef SEEK_SET
00182 #ifdef L_SET
00183 #define SEEK_SET L_SET
00184 #else
00185 #define SEEK_SET 0
00186 #endif
00187 #endif
00188 
00189 #ifdef CC_BADSIGDEF_CAST
00190 
00191 #undef SIG_ERR
00192 #undef SIG_DFL
00193 #undef SIG_IGN
00194 #define SIG_ERR ((void(*)(int))-1)
00195 #define SIG_DFL ((void(*)(int))0)
00196 #define SIG_IGN ((void(*)(int))1)
00197 
00198 #endif
00199 
00200 #endif /* __MACHDEFS_H */

Generated on Thu Oct 20 14:58:40 2005 for DominoParitySeparator by  doxygen 1.4.5