|
|
1.1 ! root 1: /* general.h - general compatibility */ ! 2: ! 3: /* ! 4: * $Header: /f/osi/h/RCS/general.h,v 7.2 90/07/09 14:37:45 mrose Exp $ ! 5: * ! 6: * ! 7: * $Log: general.h,v $ ! 8: * Revision 7.2 90/07/09 14:37:45 mrose ! 9: * sync ! 10: * ! 11: * Revision 7.1 90/03/06 14:10:28 mrose ! 12: * jch ! 13: * ! 14: * Revision 7.0 89/11/23 21:55:44 mrose ! 15: * Release 6.0 ! 16: * ! 17: */ ! 18: ! 19: /* ! 20: * NOTICE ! 21: * ! 22: * Acquisition, use, and distribution of this module and related ! 23: * materials are subject to the restrictions of a license agreement. ! 24: * Consult the Preface in the User's Manual for the full terms of ! 25: * this agreement. ! 26: * ! 27: */ ! 28: ! 29: ! 30: #ifndef _GENERAL_ ! 31: #define _GENERAL_ ! 32: ! 33: #ifndef _CONFIG_ ! 34: #include "config.h" /* system-specific configuration */ ! 35: #endif ! 36: ! 37: ! 38: /* target-dependent defines: ! 39: ! 40: BSDFORK - target has BSD vfork ! 41: BSDLIBC - target has real BSD libc ! 42: BSDSTRS - target has BSD strings ! 43: SWABLIB - target has byteorder(3n) routines ! 44: */ ! 45: ! 46: #ifdef SOCKETS ! 47: #define SWABLIB ! 48: #endif ! 49: ! 50: #ifdef WINTLI ! 51: #define SWABLIB ! 52: #endif ! 53: ! 54: #ifdef EXOS ! 55: #define SWABLIB ! 56: #endif ! 57: ! 58: ! 59: #ifdef BSD42 ! 60: #define BSDFORK ! 61: #define BSDLIBC ! 62: #define BSDSTRS ! 63: #endif ! 64: ! 65: #ifdef ROS ! 66: #undef BSDFORK ! 67: #undef BSDLIBC ! 68: #define BSDSTRS ! 69: #ifndef BSD42 ! 70: #define BSD42 ! 71: #endif ! 72: #undef SWABLIB ! 73: #endif ! 74: ! 75: #ifdef SYS5 ! 76: #undef BSDFORK ! 77: #undef BSDLIBC ! 78: #undef BSDSTRS ! 79: #endif ! 80: ! 81: #ifdef sgi ! 82: #undef BSDFORK ! 83: #undef BSDLIBC ! 84: #undef BSDSTRS ! 85: #endif ! 86: ! 87: #ifdef HPUX ! 88: #define BSDFORK ! 89: #undef BSDLIBC ! 90: #undef BSDSTRS ! 91: #undef SWABLIB ! 92: #endif ! 93: ! 94: #ifdef pyr ! 95: #undef SWABLIB ! 96: #endif ! 97: ! 98: #ifdef apollo ! 99: #undef SWABLIB ! 100: #endif ! 101: ! 102: #ifdef AUX ! 103: #undef BSDFORK ! 104: #define BSDSTRS ! 105: #undef SWABLIB ! 106: #define BSDLIBC ! 107: #endif ! 108: ! 109: #ifndef BSDFORK ! 110: #define vfork fork ! 111: #endif ! 112: ! 113: /* STRINGS */ ! 114: ! 115: #ifndef BSDSTRS ! 116: #define index strchr ! 117: #define rindex strrchr ! 118: #endif ! 119: ! 120: char *index (); ! 121: char *mktemp (); ! 122: char *rindex (); ! 123: #if defined(BSDSTRS) && !defined(BSD44) && (!defined(BSD43) || defined(SUNOS4) || defined(vax) || defined(RT)) ! 124: char *sprintf (); ! 125: #else ! 126: int sprintf (); ! 127: #endif ! 128: char *strcat (); ! 129: int strcmp (); ! 130: char *strcpy (); ! 131: int strlen (); ! 132: char *strncat (); ! 133: int strncmp (); ! 134: char *strncpy (); ! 135: ! 136: char *getenv (); ! 137: char *calloc (), *malloc (), *realloc (); ! 138: ! 139: #if defined(SYS5) && !defined(AIX) && !defined(OSX) ! 140: #include <memory.h> ! 141: ! 142: #define bcopy(b1,b2,length) (void) memcpy ((b2), (b1), (length)) ! 143: #define bcmp(b1,b2,length) memcmp ((b1), (b2), (length)) ! 144: #define bzero(b,length) (void) memset ((b), 0, (length)) ! 145: #endif ! 146: ! 147: /* HEXIFY */ ! 148: ! 149: int explode (), implode (); ! 150: ! 151: /* SPRINTB */ ! 152: ! 153: char *sprintb (); ! 154: ! 155: /* STR2VEC */ ! 156: ! 157: #define NVEC 100 ! 158: #define NSLACK 10 ! 159: ! 160: ! 161: #define str2vec(s,v) str2vecX ((s), (v), 0, NULLIP, NULL) ! 162: ! 163: int str2vecX (); ! 164: ! 165: /* STR2ELEM */ ! 166: ! 167: #define NELEM 20 ! 168: ! 169: int str2elem (); ! 170: ! 171: /* STR2SEL */ ! 172: ! 173: int str2sel (); ! 174: char *sel2str (); ! 175: ! 176: /* GETPASS */ ! 177: ! 178: char *getpassword (); ! 179: ! 180: /* BADUSER */ ! 181: ! 182: int baduser (); ! 183: ! 184: /* UTILITIES */ ! 185: ! 186: extern char chrcnv[], nochrcnv[]; ! 187: ! 188: ! 189: int lexequ (), lexnequ (); ! 190: ! 191: int log_tai (); ! 192: ! 193: int sstr2arg (); ! 194: ! 195: char *smalloc (), *strdup (); ! 196: ! 197: /* MISC */ ! 198: ! 199: char *sys_errname (); ! 200: ! 201: #ifdef lint ! 202: #define insque(e,p) INSQUE ((char *) (e), (char *) (p)) ! 203: #define remque(e) REMQUE ((char *) (e)) ! 204: #endif ! 205: ! 206: ! 207: void asprintf (), _asprintf (); ! 208: ! 209: void isodetailor (); /* also in tailor.h */ ! 210: ! 211: ! 212: #ifndef ntohs ! 213: unsigned short ntohs (); ! 214: #endif ! 215: #ifndef htons ! 216: unsigned short htons (); ! 217: #endif ! 218: #ifndef ntohl ! 219: unsigned long ntohl (); ! 220: #endif ! 221: #ifndef htonl ! 222: unsigned long htonl (); ! 223: #endif ! 224: ! 225: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.