1 /* 2 * Author: William Chia-Wei Cheng (bill.cheng@acm.org) 3 * 4 * Copyright (C) 2001-2009, William Chia-Wei Cheng. 5 * 6 * This file may be distributed under the terms of the Q Public License 7 * as defined by Trolltech AS of Norway and appearing in the file 8 * LICENSE.QPL included in the packaging of this file. 9 * 10 * THIS FILE IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND, INCLUDING 11 * THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 12 * PURPOSE. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, 13 * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING 14 * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 15 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 16 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 * 18 * @(#)$Header: /mm2/home/cvs/bc-src/tgif/tgifdefs.h,v 1.10 2011/05/16 16:22:00 william Exp $ 19 */ 20 21 #ifndef _TGIFDEFS_H_ 22 #define _TGIFDEFS_H_ 23 24 #ifdef HAVE_CONFIG_H 25 #include "config.h" 26 #endif /* HAVE_CONFIG_H */ 27 28 #include <sys/types.h> 29 #include <sys/time.h> 30 #include <sys/stat.h> 31 #include <sys/file.h> 32 #include <sys/wait.h> 33 #include <sys/socket.h> 34 #include <sys/ioctl.h> 35 36 #include <netinet/in.h> 37 #include <arpa/inet.h> 38 #include <netdb.h> 39 40 #ifdef HAVE_GETTIMEOFDAY 41 #undef _NO_GETTIMEOFDAY 42 #endif /* HAVE_GETTIMEOFDAY */ 43 44 #ifdef _NO_GETTIMEOFDAY 45 #include <sys/timeb.h> 46 #endif /* _NO_GETTIMEOFDAY */ 47 48 #ifdef isc /* SunSoft/Interactive UNIX */ 49 #include <sys/errno.h> 50 #include <sys/bsdtypes.h> 51 #endif /* isc */ 52 53 #if !defined(FD_SET) 54 #include <sys/select.h> 55 #endif /* !defined(FD_SET) */ 56 57 #ifdef HAVE_CONFIG_H 58 /* 59 * If HAVE_CONFIG_H is defined, it means that "configure" (and not imake) 60 * should be used to build tgif. 61 */ 62 #ifdef HAVE_SYS_DIR_H 63 #include <sys/dir.h> 64 #define DIR_ENTRY struct direct 65 #else /* ~HAVE_SYS_DIR_H */ 66 #ifdef HAVE_DIRENT_H 67 #include <dirent.h> 68 #define DIR_ENTRY struct dirent 69 #else /* ~HAVE_DIRENT_H */ 70 #include "vms_comp.h" 71 #define DIR_ENTRY struct dirent 72 #endif /* HAVE_DIRENT_H */ 73 #endif /* HAVE_SYS_DIR_H */ 74 #else /* ~HAVE_CONFIG_H */ 75 /* 76 * If HAVE_CONFIG_H is not defined, it means that tgif should 77 * be built with imake (and not with "configure"). 78 */ 79 #ifdef VMS 80 #include "vms_comp.h" 81 #define DIR_ENTRY struct dirent 82 #else /* ~VMS */ 83 #ifdef ibm 84 #include <sys/dir.h> 85 #define DIR_ENTRY struct direct 86 #else /* ~ibm */ 87 #ifdef apollo 88 #include <sys/dir.h> 89 #define DIR_ENTRY struct direct 90 #else /* ~apollo */ 91 #ifdef NeXT 92 #include <sys/dir.h> 93 #define DIR_ENTRY struct direct 94 #else /* ~NeXT */ 95 #ifdef luna88k 96 #include <sys/dir.h> 97 #define DIR_ENTRY struct direct 98 #else /* ~luna88k */ 99 #ifdef sequent 100 #include <sys/dir.h> 101 #define DIR_ENTRY struct direct 102 #else /* ~sequent */ 103 #include <dirent.h> 104 #define DIR_ENTRY struct dirent 105 #endif /* sequent */ 106 #endif /* luna88k */ 107 #endif /* NeXT */ 108 #endif /* apollo */ 109 #endif /* ibm */ 110 #endif /* VMS */ 111 #endif /* HAVE_CONFIG_H */ 112 113 #ifdef __NetBSD__ 114 #if !defined(__ELF__) && !defined(mips) 115 #define _DL_EXPORT_UNDERSCORE 116 #else /* ~(!defined(__ELF__) && !defined(mips)) */ 117 #ifdef _DL_EXPORT_UNDERSCORE 118 #undef _DL_EXPORT_UNDERSCORE 119 #endif /* _DL_EXPORT_UNDERSCORE */ 120 #endif /* !defined(__ELF__) && !defined(mips) */ 121 #endif /* __NetBSD__ */ 122 123 #ifdef NOT_DEFINED 124 /* 125 * On some Mac OS X systems, libdl.dylib exists but there is no <dlcfn.h>. 126 * Not sure if someone deleted <dlfcn.h> or it's a problem with the 127 * system. 128 */ 129 #ifdef HAVE_LIBDL 130 #undef _NO_DL_SUPPORT 131 #endif /* HAVE_LIBDL */ 132 #endif /* NOT_DEFINED */ 133 134 #ifndef _NO_DL_SUPPORT 135 #include <dlfcn.h> 136 #ifndef RTLD_GLOBAL 137 #define RTLD_GLOBAL 0 138 #endif /* ~RTLD_GLOBAL */ 139 #endif /* ~_NO_DL_SUPPORT */ 140 141 #include <math.h> 142 #include <stdio.h> 143 #include <string.h> 144 #include <fcntl.h> 145 #include <stdlib.h> 146 #include <unistd.h> 147 #include <signal.h> 148 #include <errno.h> 149 #include <time.h> 150 151 #ifdef HAVE_STDINT_H 152 #include <stdint.h> 153 #endif /* HAVE_STDINT_H */ 154 155 #ifdef _ENABLE_NLS 156 #ifndef ENABLE_NLS 157 #define ENABLE_NLS 158 #endif /* ~ENABLE_NLS */ 159 #endif /* _ENABLE_NLS */ 160 161 #ifndef _NO_LOCALE_SUPPORT 162 #ifdef ENABLE_NLS 163 #include <libintl.h> 164 #endif /* ENABLE_NLS */ 165 #endif /* ~_NO_LOCALE_SUPPORT */ 166 167 #include <X11/Xlib.h> 168 #include <X11/Xatom.h> 169 #include <X11/Xutil.h> 170 #include <X11/keysym.h> 171 #include <X11/cursorfont.h> 172 173 #ifndef _NO_LOCALE_SUPPORT 174 #include <X11/Xlocale.h> 175 #endif /* ~_NO_LOCALE_SUPPORT */ 176 177 #include "const.h" 178 #include "types.h" 179 180 #endif /*_TGIFDEFS_H_*/ 181