| 1 | /* -*-c-*- |
| 2 | * |
| 3 | * $Id: config.h.in,v 1.1 1997/07/21 13:47:52 mdw Exp $ |
| 4 | * |
| 5 | * Default settings for `become' config.h |
| 6 | * |
| 7 | * (c) 1997 Mark Wooding |
| 8 | */ |
| 9 | |
| 10 | /*----- Licencing notice --------------------------------------------------* |
| 11 | * |
| 12 | * This file is part of `become' |
| 13 | * |
| 14 | * `Become' is free software; you can redistribute it and/or modify |
| 15 | * it under the terms of the GNU General Public License as published by |
| 16 | * the Free Software Foundation; either version 2 of the License, or |
| 17 | * (at your option) any later version. |
| 18 | * |
| 19 | * `Become' is distributed in the hope that it will be useful, |
| 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 22 | * GNU General Public License for more details. |
| 23 | * |
| 24 | * You should have received a copy of the GNU General Public License |
| 25 | * along with `become'; if not, write to the Free Software |
| 26 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 27 | */ |
| 28 | |
| 29 | /*----- Revision history --------------------------------------------------* |
| 30 | * |
| 31 | * $Log: config.h.in,v $ |
| 32 | * Revision 1.1 1997/07/21 13:47:52 mdw |
| 33 | * Initial revision |
| 34 | * |
| 35 | */ |
| 36 | |
| 37 | #ifndef CONFIG_H |
| 38 | #define CONFIG_H |
| 39 | |
| 40 | /*----- Configuration time ------------------------------------------------*/ |
| 41 | |
| 42 | /* --- My version number --- */ |
| 43 | #define VERSION ??? |
| 44 | |
| 45 | /* --- Where to find things --- */ |
| 46 | |
| 47 | /* The `etcdir' contains configuration and state information */ |
| 48 | #define ETCDIR "/usr/local/etc" |
| 49 | |
| 50 | /* Other filenames based on the above */ |
| 51 | #define file_KEY (ETCDIR "/become.key") |
| 52 | #define file_PID (ETCDIR "/become.pid") |
| 53 | #define file_RANDSEED (ETCDIR "/become.random") |
| 54 | #define file_RULES (ETCDIR "/become.conf") |
| 55 | #define file_SERVER (ETCDIR "/become.server") |
| 56 | |
| 57 | /* --- Endianness (for transfer and cryptography) --- */ |
| 58 | |
| 59 | /* If defined, we're big-endian */ |
| 60 | #undef WORDS_BIGENDIAN |
| 61 | |
| 62 | /* --- Swap endianness if necessary (don't alter this lot) --- */ |
| 63 | |
| 64 | #define END_SWAP(n) \ |
| 65 | do { \ |
| 66 | register unsigned long x; \ |
| 67 | x = n; \ |
| 68 | x = ((x<<24) & 0xFF000000ul) | \ |
| 69 | ((x<< 8) & 0x00FF0000ul) | \ |
| 70 | ((x>> 8) & 0x0000FF00ul) | \ |
| 71 | ((x>>24) & 0x000000FFul); \ |
| 72 | n = x; \ |
| 73 | } while (0); |
| 74 | |
| 75 | #ifdef WORDS_BIGENDIAN |
| 76 | # define TO_BIG_END(x) ((void)0) |
| 77 | # define FROM_BIG_END(x) ((void)0) |
| 78 | # define TO_LITTLE_END(x) END_SWAP(x) |
| 79 | # define FROM_LITTLE_END(x) END_SWAP(x) |
| 80 | #else |
| 81 | # define TO_BIG_END(x) END_SWAP(x) |
| 82 | # define FROM_BIG_END(x) END_SWAP(x) |
| 83 | # define TO_LITTLE_END(x) ((void)0) |
| 84 | # define FROM_LITTLE_END(x) ((void)0) |
| 85 | #endif |
| 86 | |
| 87 | /* --- Find a suitable 32-bit type --- */ |
| 88 | |
| 89 | /* Define to be the size of an int */ |
| 90 | #define SIZEOF_INT 4 |
| 91 | |
| 92 | #if SIZEOF_INT < 4 |
| 93 | typedef unsigned long uint_32; |
| 94 | #else |
| 95 | typedef unsigned int uint_32; |
| 96 | #endif |
| 97 | |
| 98 | /* --- Path separator character --- */ |
| 99 | |
| 100 | /* This is replaced by `/' by `configure' -- leave alone for DOSness */ |
| 101 | #define PATHSEP '\\' |
| 102 | |
| 103 | /* --- Whether to do debugging --- */ |
| 104 | |
| 105 | #ifndef TEST_RIG |
| 106 | #undef NDEBUG |
| 107 | #endif |
| 108 | |
| 109 | #ifdef NDEBUG |
| 110 | # define D(x) /* empty */ |
| 111 | #else |
| 112 | # define D(x) x |
| 113 | #endif |
| 114 | |
| 115 | /* --- YP support --- */ |
| 116 | |
| 117 | #undef HAVE_YP |
| 118 | |
| 119 | /* --- Useful types --- */ |
| 120 | |
| 121 | /* Type representing a user id */ |
| 122 | #undef uid_t |
| 123 | |
| 124 | /* Type representing a group id */ |
| 125 | #undef gid_t |
| 126 | |
| 127 | /* Type representing a process id */ |
| 128 | #undef pid_t |
| 129 | |
| 130 | /*----- That's all, folks -------------------------------------------------*/ |
| 131 | |
| 132 | #endif |