1 /* -*- mode: c; mode: fold -*- */ 2 # ifndef __CONFIG_H 3 # define __CONFIG_H 1 4 5 /*{{{ changeable configuration */ 6 /* 7 * Define signal handling: 8 * POSIX_SIGNAL if you have the Posix sigaction() family 9 * BSD_SIGNAL if you have BSD like signal() handling 10 * SYSV_SIGNAL if you have SysV like signal() handling 11 * SIG_VOID_RETURN if your signal handler returns void 12 * SIG_INT_RETURN if your signal handler returns int 13 */ 14 # define POSIX_SIGNAL 1 15 # define BSD_SIGNAL 0 16 # define SYSV_SIGNAL 0 17 # define SIG_VOID_RETURN 1 18 # define SIG_INT_RETURN 0 19 20 /* 21 * Set each define to 1, if you have the matching header file, otherwise 22 * set it to 0. Remember, that some features may not available, if the 23 * header file is not available. 24 */ 25 /* 26 * Needed only by some systems, which do not define FD_SET etc. 27 * in sys/time.h 28 */ 29 # define HAVE_SYS_SELECT_H 1 30 31 /* 32 * If you have locales set this. This is useful to for character 33 * conversion/classification 34 */ 35 # define HAVE_LOCALE_H 1 36 37 /* 38 * If you have Posix regular expressions, set this. Otherwise a 39 * very weak replacement is used to find matching services 40 */ 41 # define HAVE_REGEX_H 1 42 43 /* 44 * one of these is required for SysV like lockfiles 45 */ 46 # define HAVE_SYS_SYSMACROS_H 0 47 # define HAVE_SYS_MKDEV_H 0 48 49 /* 50 * Some system do not define the getopt stuff in unistd.h, but in 51 * a own include file getopt.h. Or (like the GNU libc) defines there 52 * the extended getopt_long version. 53 */ 54 # define HAVE_GETOPT_H 0 55 56 /* 57 * Set each define to 1, if your library supports the function, otherwise 58 * set it to 0. See above for note. 59 */ 60 /* 61 * If the library contains this function, a call to it is required 62 * to get valid return values from localtime 63 */ 64 # define HAVE_TZSET 1 65 66 /* 67 * If these are not set, chmod()/chown() are used 68 */ 69 # define HAVE_FCHMOD 1 70 # define HAVE_FCHOWN 1 71 72 /* 73 * If you have sigsetjmp() you definitly want to set this, otherwise 74 * longjmp() from the signal handler leads into chaos 75 */ 76 # define HAVE_SIGSETJMP 1 77 78 /* 79 * Memory access functions. Nearly everybody has memcpy()/memset(), so 80 * choose the bcopy()/bzero() part only if you are missing the other two 81 */ 82 # define HAVE_MEMCPY 1 83 # define HAVE_BCOPY 0 84 # define HAVE_MEMSET 1 85 # define HAVE_BZERO 0 86 87 /* 88 * If your library supports getopt at all 89 */ 90 # define HAVE_GETOPT 1 91 92 /* 93 * If your library supports long options (getopt_long(3)), then set this 94 * to one 95 */ 96 # define HAVE_GETOPT_LONG 0 97 98 /* 99 * If you have getopt(3), but your headerfile(s) does not declare 100 * optind/optarg set this to 1, otherwise to 0 101 */ 102 # define NEED_OPTIND_OPTARG 0 103 104 /* 105 * If your realloc(3) function cannot handle realloc (NULL, size), then 106 * set this to 1, otherwise to 0 107 */ 108 # define BROKEN_REALLOC 0 109 110 /* -------------- END OF CHANGEABLE PART ------------------ */ 111 /*}}}*/ 112 /*{{{ auto configuration part */ 113 /* 114 * Autoconfiguration 115 */ 116 # if ! HAVE_MEMCPY 117 # if HAVE_BCOPY 118 # define memcpy(aa,bb,cc) bcopy((bb),(aa),(cc)) 119 # else /* HAVE_BCOPY */ 120 # error "Neither memcopy() nor bcopy() available, aborted" 121 # endif /* HAVE_BCOPY */ 122 # endif /* BSD */ 123 124 # if BROKEN_REALLOC 125 # define Realloc(ppp,sss) ((ppp) ? realloc ((ppp), (sss)) : malloc ((sss))) 126 # else /* BROKEN_REALLOC */ 127 # define Realloc realloc 128 # endif /* BROKEN_REALLOC */ 129 130 # ifndef __GCC__ 131 # define inline 132 # endif /* __GCC__ */ 133 /*}}}*/ 134 # endif /* __CONFIG_H */ 135