1 /* 2 * config.h - Platform or OS specific feature configuration 3 * 4 * xmcd - Motif(R) CD Audio Player/Ripper 5 * cda - Command-line CD Audio Player/Ripper 6 * 7 * Copyright (C) 1993-2004 Ti Kan 8 * E-mail: xmcd@amb.org 9 * 10 * This program is free software; you can redistribute it and/or modify 11 * it under the terms of the GNU General Public License as published by 12 * the Free Software Foundation; either version 2 of the License, or 13 * (at your option) any later version. 14 * 15 * This program is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU General Public License for more details. 19 * 20 * You should have received a copy of the GNU General Public License 21 * along with this program; if not, write to the Free Software 22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 23 * 24 */ 25 #ifndef __CONFIG_H__ 26 #define __CONFIG_H__ 27 28 #ifndef lint 29 static char *_config_h_ident_ = "@(#)config.h 7.14 04/04/05"; 30 #endif 31 32 /* 33 * The following defines are configured here: 34 * 35 * BSDCOMPAT 36 * The system is a BSD-derived UNIX flavor. 37 * 38 * USE_TERMIOS 39 * USE_TERMIO 40 * USE_SGTTY 41 * One of these should be defined for tty mode control. 42 * 43 * USE_SIGACTION 44 * USE_SIGSET 45 * USE_SIGNAL 46 * One of these should be defined for signal disposition control. 47 * 48 * USE_SELECT 49 * USE_POLL 50 * USE_NAP 51 * USE_USLEEP 52 * USE_NANOSLEEP 53 * USE_PTHREAD_DELAY_NP 54 * One of the above should be defined to determine which method 55 * is used for high-resolution timing delay. 56 * 57 * USE_SIGPROCMASK 58 * USE_SIGBLOCK 59 * One of these should be defined to determine which method is 60 * used to block signals. 61 * 62 * USE_SETEUID 63 * USE_SETREUID 64 * USE_SETRESUID 65 * One of these should be defined to determine which method is 66 * used to set the effective uid. 67 * 68 * USE_SETEGID 69 * USE_SETREGID 70 * USE_SETRESGID 71 * One of these should be defined to determine which method is 72 * used to set the effective gid. 73 * 74 * USE_RENAME 75 * Specify that the rename(2) system call shall be used to change the 76 * name of a file. Otherwise the link(2) and unlink(2) systems calls 77 * will be used instead. 78 * 79 * USE_GETWD 80 * Use the getwd(3) function to determine the current working directory 81 * instead of getcwd(3). This is only used if BSDCOMPAT is also 82 * defined. 83 * 84 * HAS_LONG_LONG 85 * The compiler supports the "long long" type for a 64-bit integer. 86 * For gcc this capability is auto-detected and this definition is 87 * not necessary. 88 * 89 * HAS_ITIMER 90 * The system supports the setitimer(3) and getitimer(3) high 91 * resolution timer facility. 92 * 93 * HAS_ICONV 94 * The system supports the open_iconv(3), close_iconv(3) and iconv(3) 95 * functions (for character set conversion). 96 * 97 * HAS_PTHREADS 98 * The system supports POSIX 1003.1c threads (i.e., has <pthread.h> 99 * and a functional preemptive pthread library). This is normally 100 * automatically detected, but you may need to force this on some 101 * platforms. 102 * 103 * NO_PTHREADS 104 * Force POSIX threads support to be disabled. If both NO_PTHREADS 105 * and HAS_PTHREADS are defined, the latter takes precedence. 106 * 107 * NEED_PTHREAD_INIT 108 * The system requires a call to pthread_init() upon entry into 109 * main() in a multi-threaded program. 110 * 111 * USE_SIGTHREADMASK 112 * The system supports the sigthreadmask(3) function instead of 113 * pthread_sigmask(3) for blocking signals in a thread. 114 * 115 * USE_SYS_SOUNDCARD_H 116 * For OSS sound driver support, use the <sys/soundcard.h> header file 117 * instead of the one supplied with the xmcd source code package. 118 * 119 * NO_FCHMOD 120 * The system does not support the fchmod(2) system call. 121 * 122 * NO_FSYNC 123 * The system does not support the fsync(2) system call. 124 * 125 * AIX_IDE (AIX only) 126 * Enable the AIX IDE ioctl method. This option must be used for 127 * AIX 4.x users that are using IDE CD-ROM drives who wants to use 128 * any of the CDDA modes. 129 * 130 * SOL2_RSENSE (Solaris only) 131 * Whether to include code that makes use of the auto request-sense 132 * feature in Solaris 2.2 or later. 133 * 134 * NETBSD_OLDIOC (NetBSD only) 135 * Whether to enable the old-NetBSD ioctl method. This option must be 136 * used for users of older NetBSD systems (prior to v1.2G or so). 137 * 138 * OEM_CDROM 139 * Define this if you have one of those strange OEM SCSI CD-ROM 140 * drives that identify themselves as a hard disk (see the FAQ file). 141 * 142 * NOVISUAL 143 * Build cda without the visual (curses) mode support. 144 * 145 */ 146 147 /* AIX */ 148 #if defined(_AIX) 149 #define USE_TERMIO 150 #define USE_SELECT 151 #define USE_SIGPROCMASK 152 #define USE_SIGTHREADMASK 153 #define USE_SETEUID 154 #define USE_SETEGID 155 #define HAS_ITIMER 156 #define HAS_ICONV 157 #define NEED_PTHREAD_INIT 158 #define AIX_IDE 159 #endif 160 161 /* A/UX */ 162 #if defined(macII) 163 #define USE_TERMIO 164 #ifndef USG 165 #define USG 166 #endif 167 #endif 168 169 /* BSD/OS */ 170 #if defined(__bsdi__) 171 #define BSDCOMPAT 172 #define USE_TERMIOS 173 #define USE_SIGACTION 174 #define USE_SELECT 175 #define USE_SIGPROCMASK 176 #define USE_SETEUID 177 #define USE_SETEGID 178 #define HAS_ITIMER 179 #if !defined(HAS_NCURSES_H) 180 #define NOVISUAL 181 #endif 182 #endif 183 184 /* FreeBSD */ 185 #if defined(__FreeBSD__) 186 #define BSDCOMPAT 187 #define USE_TERMIOS 188 #define USE_SIGACTION 189 #define USE_SELECT 190 #define USE_SETEUID 191 #define USE_SETEGID 192 #define USE_SIGPROCMASK 193 #endif 194 195 /* HP-UX */ 196 #if defined(__hpux) 197 #define USE_TERMIO 198 #define USE_SIGACTION 199 #define USE_SELECT 200 #define USE_SETRESUID 201 #define USE_SETRESGID 202 #define USE_SIGPROCMASK 203 #define HAS_ITIMER 204 #if defined(_INCLUDE_POSIX1C_SOURCE) 205 #define HAS_PTHREADS 206 #endif 207 #endif 208 209 /* IRIX */ 210 #if defined(sgi) 211 #define USE_TERMIO 212 #define USE_SIGACTION 213 #define USE_SELECT 214 #define USE_SIGPROCMASK 215 #define USE_SETEUID 216 #define USE_SETEGID 217 #define HAS_ITIMER 218 #if defined(_IRIX6) 219 #define HAS_ICONV 220 #define HAS_LONG_LONG 221 #endif 222 #endif 223 224 /* Linux */ 225 #if defined(_LINUX) 226 #define USE_TERMIO 227 #define USE_SIGACTION 228 #define USE_SELECT 229 #define USE_SIGPROCMASK 230 #define USE_SETEUID 231 #define USE_SETEGID 232 #define HAS_ITIMER 233 #if defined(HAS_ICONV_H) 234 #define HAS_ICONV 235 #endif 236 #endif 237 238 /* NetBSD */ 239 #if defined(__NetBSD__) 240 #define BSDCOMPAT 241 #define USE_TERMIOS 242 #define USE_SIGACTION 243 #define USE_SELECT 244 #define USE_SETEUID 245 #define USE_SETEGID 246 #define HAS_ITIMER 247 #define USE_SIGPROCMASK 248 #define NOVISUAL 249 #endif 250 251 /* OpenBSD */ 252 #if defined(__OpenBSD__) 253 #define BSDCOMPAT 254 #define USE_SIGACTION 255 #define USE_TERMIOS 256 #define USE_SELECT 257 #define USE_SIGPROCMASK 258 #define USE_SETEUID 259 #define USE_SETEGID 260 #define HAS_ITIMER 261 #endif 262 263 /* OpenVMS */ 264 #if defined(__VMS) 265 #if defined(HAS_PTHREADS) && !defined(NO_PTHREADS) 266 #define USE_PTHREAD_DELAY_NP 267 #else 268 #define USE_USLEEP 269 #endif 270 #endif 271 272 /* OSF1/Digital UNIX/Tru64 UNIX */ 273 #if defined(_OSF1) 274 #define BSDCOMPAT 275 #define USE_TERMIOS 276 #define USE_SIGACTION 277 #define USE_SELECT 278 #define USE_SIGPROCMASK 279 #define USE_SETEUID 280 #define USE_SETEGID 281 #define HAS_ITIMER 282 #define HAS_ICONV 283 #endif 284 285 /* SCO UNIX/Open Desktop/Open Server */ 286 #if defined(_SCO_SVR3) 287 #define USE_TERMIO 288 #define USE_SIGACTION 289 #define USE_SELECT 290 #define USE_SIGPROCMASK 291 #if defined(_SCO5) 292 #define USE_SETEUID 293 #define USE_SETEGID 294 #define HAS_ITIMER 295 #define HAS_ICONV 296 #else 297 #define NO_FCHMOD 298 #define NO_FSYNC 299 #endif 300 #endif 301 302 /* Sony NEWS */ 303 #if defined(sony_news) 304 #define BSDCOMPAT 305 #define USE_SGTTY 306 #define NOVISUAL 307 #endif 308 309 /* Solaris */ 310 #if defined(_SOLARIS) 311 #define USE_TERMIO 312 #define USE_SIGACTION 313 #define USE_SELECT 314 #define USE_SIGPROCMASK 315 #define USE_SETEUID 316 #define USE_SETEGID 317 #define HAS_ITIMER 318 #define HAS_ICONV 319 #define SOL2_RSENSE 320 #endif 321 322 /* SunOS 4.x */ 323 #if defined(_SUN4) 324 #define BSDCOMPAT 325 #define USE_TERMIOS 326 #define USE_SIGACTION 327 #define USE_SELECT 328 #define USE_SIGPROCMASK 329 #define USE_SETEUID 330 #define USE_SETEGID 331 #define HAS_ITIMER 332 #endif 333 334 /* Ultrix */ 335 #if defined(_ULTRIX) 336 #define BSDCOMPAT 337 #define USE_TERMIO 338 #define USE_SELECT 339 #define USE_SETEUID 340 #define USE_SETEGID 341 #define USE_SIGBLOCK 342 #endif 343 344 /* SVR4.2 and UnixWare */ 345 #if defined(_UNIXWARE) 346 #define USE_TERMIO 347 #define USE_SIGACTION 348 #define USE_SELECT 349 #define USE_SIGPROCMASK 350 #define USE_SETEUID 351 #define USE_SETEGID 352 #define HAS_ITIMER 353 #if defined(_UNIXWARE2) 354 #define HAS_ICONV 355 #endif 356 #endif 357 358 /* Generic SVR4 */ 359 #if (defined(SVR4) || defined(__svr4__)) && \ 360 !defined(_SOLARIS) && !defined(sgi) && !defined(_UNIXWARE) 361 #define USE_TERMIO 362 #define USE_SIGACTION 363 #define USE_SELECT 364 #define USE_SIGPROCMASK 365 #define USE_SETEUID 366 #define USE_SETEGID 367 #define HAS_ITIMER 368 #endif 369 370 #endif /* __CONFIG_H__ */ 371 372 373