machdefs.h

Go to the documentation of this file.
00001 /****************************************************************************/
00002 /*                                                                          */
00003 /*  This file is part of QSopt_ex.                                          */
00004 /*                                                                          */
00005 /*  (c) Copyright 2006 by David Applegate, William Cook, Sanjeeb Dash,      */
00006 /*  and Daniel Espinoza                                                     */
00007 /*                                                                          */
00008 /*  Sanjeeb Dash ownership of copyright in QSopt_ex is derived from his     */
00009 /*  copyright in QSopt.                                                     */
00010 /*                                                                          */
00011 /*  This code may be used under the terms of the GNU General Public License */
00012 /*  (Version 2.1 or later) as published by the Free Software Foundation.    */
00013 /*                                                                          */
00014 /*  Alternatively, use is granted for research purposes only.               */
00015 /*                                                                          */
00016 /*  It is your choice of which of these two licenses you are operating      */
00017 /*  under.                                                                  */
00018 /*                                                                          */
00019 /*  We make no guarantees about the correctness or usefulness of this code. */
00020 /*                                                                          */
00021 /****************************************************************************/
00022 
00023 /* RCSINFO $Id: machdefs.h,v 1.2 2003/11/05 16:47:22 meven Exp $ */
00024 /****************************************************************************/
00025 /*                                                                          */
00026 /*  This file is part of CONCORDE                                           */
00027 /*                                                                          */
00028 /*  (c) Copyright 1995--1999 by David Applegate, Robert Bixby,              */
00029 /*  Vasek Chvatal, and William Cook                                         */
00030 /*                                                                          */
00031 /*  Permission is granted for academic research use.  For other uses,       */
00032 /*  contact the authors for licensing options.                              */
00033 /*                                                                          */
00034 /*  Use at your own risk.  We make no guarantees about the                  */
00035 /*  correctness or usefulness of this code.                                 */
00036 /*                                                                          */
00037 /****************************************************************************/
00038 
00039 #ifndef __MACHDEFS_H
00040 #define __MACHDEFS_H
00041 #include "qs_config.h"
00042 
00043 #ifdef HAVE_STDIO_H
00044 # include <stdio.h>
00045 #endif
00046 
00047 #ifdef HAVE_STDARG_H
00048 # include <stdarg.h>
00049 #endif
00050 #ifdef HAVE_STDLIB_H
00051 # include <stdlib.h>
00052 #endif
00053 #ifdef HAVE_MATH_H
00054 # include <math.h>
00055 #endif
00056 #ifdef HAVE_STRING_H
00057 # include <string.h>
00058 #endif
00059 #ifdef HAVE_STRINGS_H
00060 #  include <strings.h>
00061 #endif
00062 #ifdef HAVE_ERRNO_H
00063 # include <errno.h>
00064 #endif
00065 #ifdef TIME_WITH_SYS_TIME
00066 # include <sys/time.h>
00067 # include <time.h>
00068 #else
00069 # ifdef HAVE_SYS_TIME_H
00070 #  include <sys/time.h>
00071 # else
00072 #  ifdef HAVE_TIME_H
00073 #   include <time.h>
00074 #  endif
00075 # endif
00076 #endif
00077 #ifdef HAVE_STDDEF_H
00078 # include <stddef.h>
00079 #endif
00080 #ifdef HAVE_UNISTD_H
00081 # include <unistd.h>
00082 #endif
00083 #ifdef HAVE_MALLOC_H
00084 # include <stdlib.h>
00085 #endif
00086 #ifdef HAVE_SYS_TYPES_H
00087 # include <sys/types.h>
00088 #endif
00089 #ifdef HAVE_SYS_STAT_H
00090 # include <sys/stat.h>
00091 #endif
00092 #ifdef HAVE_SYS_RESOURCE_H
00093 # include <sys/resource.h>
00094 #endif
00095 #ifdef HAVE_FCNTL_H
00096 # include <fcntl.h>
00097 #endif
00098 #ifdef HAVE_SYS_SOCKET_H
00099 # include <sys/socket.h>
00100 #endif
00101 #ifdef HAVE_NETDB_H
00102 # include <netdb.h>
00103 #endif
00104 #ifdef HAVE_NETINET_IN_H
00105 # include <netinet/in.h>
00106 #endif
00107 
00108 #ifdef HAVE_SOCKET
00109 #define ILL_NETREADY
00110 #endif
00111 
00112 #ifdef USEDMALLOC
00113 #include "dmalloc.h"
00114 #endif
00115 
00116 #ifdef ILL_ATTRIBUTE
00117 #define ILL_UNUSED __attribute__ ((unused))
00118 #else
00119 #define ILL_UNUSED
00120 #endif
00121 
00122 #ifdef ILL_PROTO_PRINTF
00123 /* assume that if you're missing printf, you're missing a bunch */
00124 extern int printf (
00125   const char *,
00126   ...),
00127   fprintf (
00128   FILE *,
00129   const char *,
00130   ...),
00131   fflush (
00132   FILE *),
00133   scanf (
00134   const char *,
00135   ...),
00136   sscanf (
00137   const char *,
00138   const char *,
00139   ...),
00140   fscanf (
00141   FILE *,
00142   const char *,
00143   ...),
00144   fclose (
00145   FILE *),
00146   ungetc (
00147   int,
00148   FILE *),
00149   _filbuf (
00150   FILE *),
00151   time (
00152   int *);
00153 
00154 #ifdef ILL_NETREADY
00155 extern int socket (
00156   int,
00157   int,
00158   int),
00159   connect (
00160   int,
00161   const struct sockaddr *,
00162   int),
00163   accept (
00164   int,
00165   struct sockaddr *,
00166   int *),
00167   bind (
00168   int,
00169   const struct sockaddr *,
00170   int),
00171   listen (
00172   int,
00173   int);
00174 #endif
00175 extern void *memset (
00176   void *,
00177   int,
00178   size_t),
00179   perror (
00180   const char *);
00181 #endif
00182 
00183 #ifdef ILL_PROTO_RENAME
00184 extern int rename (
00185   const char *,
00186   const char *);
00187 #endif
00188 
00189 #ifdef ILL_PROTO_GETHOSTNAME
00190 extern int gethostname (
00191   char *,
00192   int);
00193 #endif
00194 
00195 #ifdef ILL_PROTO_GETRUSAGE
00196 extern int getrusage (
00197   int,
00198   struct rusage *);
00199 #endif
00200 
00201 #ifdef ILL_PROTO___VFORK
00202 extern pid_t __vfork (
00203   void);
00204 #endif
00205 
00206 #ifndef NULL
00207 #define NULL (0)
00208 #endif
00209 
00210 //#ifndef INT_MAX
00211 //#define INT_MAX ((int) (~(((unsigned) 1) << ((8*sizeof(int))-1))))
00212 //#endif
00213 
00214 #ifndef M_PI
00215 #define M_PI 3.14159265358979323846
00216 #endif
00217 
00218 #endif /* __MACHDEFS_H */

Generated on Thu Mar 29 09:32:31 2012 for QSopt_ex by  doxygen 1.4.7