Back to index

wims  3.65+svn20090927
includes.h
Go to the documentation of this file.
00001 /*    Copyright (C) 1998-2003 XIAO, Gang of Universite de Nice - Sophia Antipolis
00002  *
00003  *  This program is free software; you can redistribute it and/or modify
00004  *  it under the terms of the GNU General Public License as published by
00005  *  the Free Software Foundation; either version 2 of the License, or
00006  *  (at your option) any later version.
00007  *
00008  *  This program is distributed in the hope that it will be useful,
00009  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00010  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011  *  GNU General Public License for more details.
00012  *
00013  *  You should have received a copy of the GNU General Public License
00014  *  along with this program; if not, write to the Free Software
00015  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00016  */
00017 
00018 /* WWW multipurpose server, include header files */
00019 
00020 #ifndef INCLUDES_H
00021 #define INCLUDES_H 1
00022 
00023 #include <stdio.h>
00024 #include <stdlib.h>
00025 #include <stdarg.h>
00026 #include <ctype.h>
00027 #include <unistd.h>
00028 #include <math.h>
00029 #include <string.h>
00030 #include <sys/stat.h>
00031 #include <sys/types.h>
00032 #include <fcntl.h>
00033 #include <errno.h>
00034 #include <signal.h>
00035 
00036 #if HAVE_DIRENT_H
00037 # include <dirent.h>
00038 # define NAMLEN(dirent) strlen((dirent)->d_name)
00039 #else
00040 # define dirent direct
00041 # define NAMLEN(dirent) (dirent)->d_namlen
00042 # if HAVE_SYS_NDIR_H
00043 #  include <sys/ndir.h>
00044 # endif
00045 # if HAVE_SYS_DIR_H
00046 #  include <sys/dir.h>
00047 # endif
00048 # if HAVE_NDIR_H
00049 #  include <ndir.h>
00050 # endif
00051 #endif
00052 
00053 #if HAVE_SYS_WAIT_H
00054 # include <sys/wait.h>
00055 #endif
00056 #ifndef WEXITSTATUS
00057 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
00058 #endif
00059 #ifndef WIFEXITED
00060 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
00061 #endif
00062 
00063 #if TIME_WITH_SYS_TIME
00064 # include <sys/time.h>
00065 # include <time.h>
00066 #else
00067 # if HAVE_SYS_TIME_H
00068 #  include <sys/time.h>
00069 # else
00070 #  include <time.h>
00071 # endif
00072 #endif
00073 
00074 #ifdef HAVE_MEMORY_H
00075 # include <memory.h>
00076 #endif
00077 
00078 #ifdef HAVE_CRYPT_H
00079 # include <crypt.h>
00080 #endif
00081 
00082 #include <sys/resource.h>
00083 #ifndef RUSAGE_SELF
00084 # define RUSAGE_SELF 0
00085 #endif
00086 #ifndef RUSAGE_CHILDREN
00087 # define RUSAGE_CHILDREN -1
00088 #endif
00089 
00090 #endif /* INCLUDES_H */
00091