home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume25 / kit / part02 / config.h.SH next >
Encoding:
Text File  |  1991-12-18  |  4.2 KB  |  125 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.0.1.5 91/11/25 15:48:49 ram Exp $
  24.  */
  25.  
  26. #ifndef _config_h_
  27. #define _config_h_
  28.  
  29. /* BYTEORDER
  30.  *    This symbol hold the hexadecimal constant defined in byteorder,
  31.  *    i.e. 0x1234 or 0x4321, etc...
  32.  */
  33. #define BYTEORDER 0x$byteorder    /* large digits for MSB */
  34.  
  35. /* GETOPT:
  36.  *    This symbol, if defined, indicates that the getopt() routine exists.
  37.  */
  38. #$d_getopt    GETOPT        /**/
  39.  
  40. /* index:
  41.  *    This preprocessor symbol is defined, along with rindex, if the system
  42.  *    uses the strchr and strrchr routines instead.
  43.  */
  44. #$d_index    index strchr    /**/
  45.  
  46. /* MEMCPY:
  47.  *    This symbol, if defined, indicates that the memcpy routine is available
  48.  *    to copy blocks of memory. You should always use bcopy() instead of
  49.  *    memcpy() because bcopy is remaped to memcpy if necessary. This means
  50.  *    that a memcpy() routine must be provided in case MEMCPY is not defined
  51.  *    and no bcopy() is found.
  52.  */
  53. #$d_memcpy    MEMCPY        /**/
  54.  
  55. /* MEMSET:
  56.  *    This symbol, if defined, indicates that the memset routine is available
  57.  *    to set blocks of memory. You should always use bzero() instead of
  58.  *    memset() because bzero is remaped to memset if necessary. This means
  59.  *    that a memset() routine must be provided in case MEMSET is not defined
  60.  *    and no bzero() is found.
  61.  */
  62. #$d_memset    MEMSET        /**/
  63.  
  64. /* SIGNAL_T:
  65.  *    This symbol's value is either "void" or "int", corresponding to the
  66.  *    appropriate return type of a signal handler.  Thus, you can declare
  67.  *    a signal handler using "SIGNAL_T (*handler())()", and define the
  68.  *    handler using "SIGNAL_T handler(sig)".
  69.  */
  70. #define SIGNAL_T $signal_t    /* Kept for backward compatibility */
  71.  
  72. /* I_SYSIOCTL:
  73.  *    This symbol, if defined, indicates that <sys/ioctl.h> exists and should
  74.  *    be included. Otherwise, include <sgtty.h> or <termio.h>.
  75.  */
  76. #$i_sysioctl    I_SYSIOCTL        /**/
  77.  
  78. /* I_TERMIO:
  79.  *    This symbol, if defined, indicates that the program should include
  80.  *    <termio.h> rather than <sgtty.h>.  There are also differences in
  81.  *    the ioctl() calls that depend on the value of this symbol.
  82.  */
  83. /* I_TERMIOS:
  84.  *    This symbol, if defined, indicates that the program should include
  85.  *    the POSIX termios.h rather than sgtty.h or termio.h.
  86.  *    There are also differences in the ioctl() calls that depend on the
  87.  *    value of this symbol.
  88.  */
  89. /* I_SGTTY:
  90.  *    This symbol, if defined, indicates that the program should include
  91.  *    <sgtty.h> rather than <termio.h>.  There are also differences in
  92.  *    the ioctl() calls that depend on the value of this symbol.
  93.  */
  94. #$i_termio    I_TERMIO        /**/
  95. #$i_termios    I_TERMIOS        /**/
  96. #$i_sgtty    I_SGTTY        /**/
  97.  
  98. /* VOIDFLAGS
  99.  *    This symbol indicates how much support of the void type is given by this
  100.  *    compiler.  What various bits mean:
  101.  *
  102.  *        1 = supports declaration of void
  103.  *        2 = supports arrays of pointers to functions returning void
  104.  *        4 = supports comparisons between pointers to void functions and
  105.  *            addresses of void functions
  106.  *        8 = suports declaration of generic void pointers
  107.  *
  108.  *    The package designer should define VOIDUSED to indicate the requirements
  109.  *    of the package.  This can be done either by #defining VOIDUSED before
  110.  *    including config.h, or by defining defvoidused in Myinit.U.  If the
  111.  *    latter approach is taken, only those flags will be tested.  If the
  112.  *    level of void support necessary is not present, defines void to int.
  113.  */
  114. #ifndef VOIDUSED
  115. #define VOIDUSED $defvoidused
  116. #endif
  117. #define VOIDFLAGS $voidflags
  118. #if (VOIDFLAGS & VOIDUSED) != VOIDUSED
  119. #$define void int        /* is void to be avoided? */
  120. #$define M_VOID            /* Xenix strikes again */
  121. #endif
  122.  
  123. #endif
  124. !GROK!THIS!
  125.