1 /* 2 * Copyright (c) 1998,1999,2000 3 * Traakan, Inc., Los Altos, CA 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright 10 * notice unmodified, this list of conditions, and the following 11 * disclaimer. 12 * 2. Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 14 * documentation and/or other materials provided with the distribution. 15 * 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 */ 28 29 /* 30 * Project: NDMJOB 31 * Ident: $Id: $ 32 * 33 * Description: 34 * This establishes the environment and options 35 * for the FreeBSD platform. This, combined with 36 * the O/S generic ndmos.h, are the foundation 37 * for NDMJOBLIB. 38 * 39 * This file is #include'd by ndmos.h when 40 * selected by #ifdef's of NDMOS_ID. 41 * 42 * Refer to ndmos.h for explanations of the 43 * macros thar are or can be #define'd here. 44 */ 45 46 #define NDMOS_ID_LINUX NDMOS_IDENT('L', 'n', 'u', 'x') 47 48 #ifndef NDMOS_ID 49 #ifdef __linux__ 50 #define NDMOS_ID NDMOS_ID_LINUX 51 #endif /* __linux__ */ 52 #endif /* !NDMOS_ID */ 53 54 55 #if NDMOS_ID == NDMOS_ID_LINUX /* probably redundant */ 56 57 #include <stdio.h> 58 #include <stdlib.h> 59 #include <stdarg.h> 60 #include <unistd.h> 61 #include <getopt.h> 62 #include <sys/types.h> 63 #include <sys/stat.h> 64 #include <sys/socket.h> 65 #include <sys/fcntl.h> 66 #include <signal.h> 67 #include <netinet/in.h> 68 #include <arpa/inet.h> 69 #include <rpc/rpc.h> 70 #include <assert.h> 71 #include <errno.h> 72 #include <string.h> 73 #include <netdb.h> 74 #include <ctype.h> 75 #include <time.h> 76 77 #undef NDMOS_OPTION_HAVE_SIN_LEN 78 79 #define NDMOS_API_STRTOLL(P, PP, BASE) strtoq(P, PP, BASE) 80 81 /* 82 * #ifndef'ed so they can be set from the Makefile command line 83 */ 84 #ifndef NDMOS_CONST_NDMJOBLIB_REVISION 85 #define NDMOS_CONST_NDMJOBLIB_REVISION "0" 86 #endif /* !NDMOS_CONST_NDMJOBLIB_REVISION */ 87 88 #ifndef NDMOS_CONST_VENDOR_NAME 89 #define NDMOS_CONST_VENDOR_NAME "PublicDomain" 90 #endif /* !NDMOS_CONST_VENDOR_NAME */ 91 92 #ifndef NDMOS_CONST_PRODUCT_NAME 93 #define NDMOS_CONST_PRODUCT_NAME "NDMJOB" 94 #endif /* !NDMOS_CONST_PRODUCT_NAME */ 95 96 #ifndef NDMOS_CONST_PRODUCT_REVISION 97 #define NDMOS_CONST_PRODUCT_REVISION "0.0" 98 #endif /* !NDMOS_CONST_PRODUCT_REVISION */ 99 100 #define NDMOS_CONST_NDMOS_REVISION "Linux-xxxx" 101 102 103 #endif /* NDMOS_ID == NDMOS_ID_FREEBSD */ 104