home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sources / misc / 4108 / config.h.SH
Encoding:
Text File  |  1992-11-20  |  7.0 KB  |  217 lines

  1. case $CONFIG in
  2. '')
  3.     if test ! -f config.sh; then
  4.         ln ../config.sh . || \
  5.         ln ../../config.sh . || \
  6.         ln ../../../config.sh . || \
  7.         (echo "Can't find config.sh."; exit 1)
  8.     fi 2>/dev/null
  9.     . ./config.sh
  10.     ;;
  11. esac
  12. echo "Extracting config.h (with variable substitutions)"
  13. sed <<!GROK!THIS! >config.h -e 's!^#undef!/\*#define!'
  14. /*
  15.  * This file was produced by running the config.h.SH script, which
  16.  * gets its values from config.sh, which is generally produced by
  17.  * running Configure.
  18.  *
  19.  * Feel free to modify any of this as the need arises.  Note, however,
  20.  * that running config.h.SH again will wipe out any changes you've made.
  21.  * For a more permanent change edit config.sh and rerun config.h.SH.
  22.  *
  23.  * \$Id: config.h.SH,v 2.9 92/07/14 16:53:43 ram Exp $
  24.  */
  25.  
  26. #ifndef _config_h_
  27. #define _config_h_
  28.  
  29. /* bcopy:
  30.  *    This symbol is maped to memcpy if the  bcopy() routine is not
  31.  *    available to copy strings.
  32.  */
  33. #$d_bcopy bcopy(s,d,l) memcpy((d),(s),(l))        /* mapped to memcpy */
  34.  
  35. /* GETHOSTNAME:
  36.  *    This symbol, if defined, indicates that the C program may use the
  37.  *    gethostname() routine to derive the host name.  See also UNAME
  38.  *    and PHOSTNAME.
  39.  */
  40. /* UNAME:
  41.  *    This symbol, if defined, indicates that the C program may use the
  42.  *    uname() routine to derive the host name.  See also GETHOSTNAME and
  43.  *    PHOSTNAME.
  44.  */
  45. /* PHOSTNAME:
  46.  *    This symbol, if defined, indicates that the C program may use the
  47.  *    contents of PHOSTNAME as a command to feed to the popen() routine
  48.  *    to derive the host name.  See also GETHOSTNAME and UNAME. Note that the
  49.  *    command uses a fully qualified path, so that it is safe even if used by
  50.  *    a process with super-user privileges.
  51.  */
  52. #$d_gethname GETHOSTNAME    /**/
  53. #$d_uname UNAME        /**/
  54. #$d_phostname PHOSTNAME "$aphostname"    /* How to get the host name */
  55.  
  56. /* index:
  57.  *    This preprocessor symbol is defined, along with rindex, if the system
  58.  *    uses the strchr and strrchr routines instead.
  59.  */
  60. /* rindex:
  61.  *    This preprocessor symbol is defined, along with index, if the system
  62.  *    uses the strchr and strrchr routines instead.
  63.  */
  64. #$d_index    index strchr    /**/
  65. #$d_index    rindex strrchr    /**/
  66.  
  67. /* RENAME:
  68.  *    This symbol, if defined, indicates that the rename routine is available
  69.  *    to rename files.  Otherwise you should do the unlink(), link(), unlink()
  70.  *    trick.
  71.  */
  72. #$d_rename    RENAME        /**/
  73.  
  74. /* STRERROR:
  75.  *    This symbol, if defined, indicates that the strerror routine is
  76.  *    available to translate error numbers to strings.
  77.  */
  78. /* SYSERRLIST:
  79.  *    This symbol, if defined, indicates that the sys_errlist array is
  80.  *    available to translate error numbers to strings. The extern int
  81.  *    sys_nerr gives the size of that table.
  82.  */
  83. /* SYSERRNOLIST:
  84.  *    This symbol, if defined, indicates that the sys_errnolist array is
  85.  *    available to translate an errno code into its symbolic name (e.g.
  86.  * ENOENT). The extern int sys_nerrno gives the size of that table.
  87.  */
  88. /* strerror:
  89.  *    This preprocessor symbol is defined as a macro if strerror() is
  90.  *    not available to translate error numbers to strings but sys_errlist[]
  91.  *    array is there.
  92.  */
  93. #$d_strerror STRERROR        /**/
  94. #$d_syserrlst SYSERRLIST        /**/
  95. #$d_sysernlst SYSERRNOLIST    /**/
  96. #$d_strerrm strerror(e) ((e)<0||(e)>=sys_nerr?"(unknown)":sys_errlist[e]) /**/
  97.  
  98. /* Time_t:
  99.  *    This symbol holds the time type, which can be long or time_t on BSD
  100.  *    sites (in which case <sys/types.h> should be included).
  101.  */
  102. #define Time_t $timetype            /* Time type */
  103.  
  104. /* UNION_WAIT:
  105.  *    This symbol if defined indicates to the C program that the argument
  106.  *    for the wait() system call should be declared as 'union wait status'
  107.  *    instead of 'int status'. You probably need to include <sys/wait.h>
  108.  *    in the former case (see I_SYSWAIT).
  109.  */
  110. #$d_uwait UNION_WAIT        /**/
  111.  
  112. /* vfork:
  113.  *    This symbol, if defined, remaps the vfork routine to fork if the
  114.  *    vfork() routine isn't supported here.
  115.  */
  116. #$d_vfork    vfork fork    /**/
  117.  
  118. /* Signal_t:
  119.  *    This symbol's value is either "void" or "int", corresponding to the
  120.  *    appropriate return type of a signal handler.  Thus, you can declare
  121.  *    a signal handler using "Signal_t (*handler())()", and define the
  122.  *    handler using "Signal_t handler(sig)".
  123.  */
  124. #define Signal_t $signal_t    /* Signal handler's return type */
  125.  
  126. /* HOSTNAME:
  127.  *    This symbol contains name of the host the program is going to run on.
  128.  *    The domain is not kept with hostname, but must be gotten from MYDOMAIN.
  129.  *    The dot comes with MYDOMAIN, and need not be supplied by the program.
  130.  *    If gethostname() or uname() exist, HOSTNAME may be ignored. If MYDOMAIN
  131.  *    is not used, HOSTNAME will hold the name derived from PHOSTNAME.
  132.  */
  133. #define HOSTNAME "$hostname"        /**/
  134.  
  135. /* I_FCNTL:
  136.  *    This symbol, if defined, indicates to the C program that it should
  137.  *    include <fcntl.h>.
  138.  */
  139. #$i_fcntl    I_FCNTL        /**/
  140.  
  141. /* I_STRING:
  142.  *    This symbol, if defined, indicates to the C program that it should
  143.  *    include <string.h> (USG systems) instead of <strings.h> (BSD systems).
  144.  */
  145. #$i_string I_STRING        /**/
  146.  
  147. /* I_SYSFILE:
  148.  *    This symbol, if defined, indicates to the C program that it should
  149.  *    include <sys/file.h> to get definition of R_OK and friends.
  150.  */
  151. #$i_sysfile    I_SYSFILE        /**/
  152.  
  153. /* I_SYSWAIT:
  154.  *    This symbol, if defined, indicates to the C program that it should
  155.  *    include <sys/wait.h>.
  156.  */
  157. #$i_syswait I_SYSWAIT    /**/
  158.  
  159. /* I_TIME:
  160.  *    This symbol, if defined, indicates to the C program that it should
  161.  *    include <time.h>.
  162.  */
  163. /* I_SYSTIME:
  164.  *    This symbol, if defined, indicates to the C program that it should
  165.  *    include <sys/time.h>.
  166.  */
  167. /* I_SYSTIMEKERNEL:
  168.  *    This symbol, if defined, indicates to the C program that it should
  169.  *    include <sys/time.h> with KERNEL defined.
  170.  */
  171. #$i_time I_TIME        /**/
  172. #$i_systime I_SYSTIME        /**/
  173. #$i_systimek I_SYSTIMEKERNEL        /**/
  174.  
  175. /* INTSIZE:
  176.  *    This symbol contains the size of an int, so that the C preprocessor
  177.  *    can make decisions based on it.
  178.  */
  179. #define INTSIZE $intsize        /**/
  180.  
  181. /* PERLPATH:
  182.  *    This symbol contains the absolute location of the perl interpeter.
  183.  */
  184. #define PERLPATH "$perlpath"        /**/
  185.  
  186. /* Pid_t:
  187.  *    This symbol holds the type used to declare process ids in the kernel.
  188.  *    It can be int, uint, pid_t, etc... It may be necessary to include
  189.  *    <sys/types.h> to get any typedef'ed information.
  190.  */
  191. #define Pid_t $pidtype        /* PID type */
  192.  
  193. /* register1:
  194.  *    This symbol, along with register2, register3, etc. is either the word
  195.  *    "register" or null, depending on whether the C compiler pays attention
  196.  *    to this many register declarations.  The intent is that you don't have
  197.  *    to order your register declarations in the order of importance, so you
  198.  *    can freely declare register variables in sub-blocks of code and as
  199.  *    function parameters.  Do not use register<n> more than once per routine.
  200.  */
  201. #define register1 $reg1        /**/
  202. #define register2 $reg2        /**/
  203. #define register3 $reg3        /**/
  204. #define register4 $reg4        /**/
  205. #define register5 $reg5        /**/
  206. #define register6 $reg6        /**/
  207.  
  208. /* Uid_t:
  209.  *    This symbol holds the type used to declare user ids in the kernel.
  210.  *    It can be int, ushort, uid_t, etc... It may be necessary to include
  211.  *    <sys/types.h> to get any typedef'ed information.
  212.  */
  213. #define Uid_t $uidtype        /* UID type */
  214.  
  215. #endif
  216. !GROK!THIS!
  217.