home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / news / nn.tar / nn-6.5.1 / conf / s-aux3-0.h < prev    next >
C/C++ Source or Header  |  1995-04-29  |  6KB  |  216 lines

  1. /*
  2.  *    This version is for A/UX 3.0.x.
  3.  *
  4.  *    jim@jagubox.gsfc.nasa.gov
  5.  *
  6.  *    Modified by Jim Jagielski to fold in some of stuff and make the
  7.  *    file a bit more universal. I also made sure that it would
  8.  *    work with 6.5... I have _only_ tested it with 'gcc' and there's
  9.  *    one hint... Use "make CC=gcc CPP='gcc -E'" to get things working
  10.  *    OK.
  11.  *
  12.  *    This file relies on the s-sys5.h file. Any items that I override have
  13.  *    comments taked from the prototype s- file, and then comments of mine
  14.  *    about the change.
  15.  *
  16.  *    Note that the s-aux1-1.h file included with nn 6.4.16 and prior
  17.  *     versions is now badly out of date. It may still run, but it's severely
  18.  *    suboptimal.
  19.  *
  20.  *    The original version was written by Alexis Rosen.
  21.  */
  22.  
  23. /*
  24.  */
  25.  
  26. #include "s-sys5.h"
  27.  
  28. /*
  29.  *    Define if signals must be set again after they are caught
  30.  */
  31.  
  32. /*    A/UX NO CHANGE
  33.  *    This is probably not necessary with BSD compatibility enabled.
  34.  *    If you want to try undef'ing it, be my guest.
  35.  */
  36.  
  37. #define    RESET_SIGNAL_WHEN_CAUGHT    /* */
  38.  
  39. /*
  40.  *    Define if your system has BSD like job control (SIGTSTP works)
  41.  */
  42.  
  43. /*    A/UX CHANGE
  44.  *    A/UX supports job control.
  45.  */
  46.  
  47. #define HAVE_JOBCONTROL            /* */
  48.  
  49. /*
  50.  *    Define if your system has a 4.3BSD like syslog library.
  51.  */
  52.  
  53. /*    A/UX CHANGE
  54.  *    A/UX has syslog.
  55.  */
  56.  
  57. #define HAVE_SYSLOG
  58.  
  59. /*
  60.  *    Pick one:
  61.  *    Define HAVE_GETHOSTNAME if you have a BSD like gethostname routine.
  62.  *    Define HAVE_UNAME if a system V compatible uname() is available.
  63.  *    Define HOSTNAME_FILE "...." to a file containing the hostname.
  64.  *    Define HOSTNAME_WHOAMI if sysname is defined in <whoami.h>.
  65.  *
  66.  *    As a final resort, define HOSTNAME to the name of your system
  67.  *    (in config.h).
  68.  */
  69.  
  70. /*    A/UX CHANGE
  71.  *    A/UX supports gethostname and uname. Use gethostname.
  72.  *    [and undef uname]
  73.  */
  74.  
  75. #undef HAVE_UNAME                /*  */
  76. #define HAVE_GETHOSTNAME            /* BSD systems */
  77.  
  78. /*
  79.  *    Define HAVE_MULTIGROUP if system has simultaneous multiple group
  80.  *    membership capability (BSD style).
  81.  *    Also define NGROUPS or include the proper .h file if NGROUPS is
  82.  *    not defined in <sys/param.h>.
  83.  *    Also define GIDSET_TYPE to the type of the elements in the array
  84.  *    initialized by getgroups() if different from "int" (many systems
  85.  *    have a gid_t, but very few use it for getgroups()).
  86.  */
  87.  
  88. /*    A/UX CHANGE
  89.  *    A/UX supports multiple groups with the appropriate setcompat call.
  90.  *    Oddly enough, NN seems to like this even without the setcompat call.
  91.  *    I haven't looked at this so I don't know why. On the other hand the
  92.  *    A/UX man pages for getgroups(2) doesn't indicate any need for calling
  93.  *    setcompat, so maybe that's why it works. Or maybe the bsd library sets
  94.  *    the compat bit for multigroup.
  95.  */
  96.  
  97. #define HAVE_MULTIGROUP    /* BSD */
  98.  
  99. /*
  100.  *    Define DETATCH_TERMINAL to be a command sequence which
  101.  *    will detatch a process from the control terminal
  102.  *    Also include system files needed to perform this HERE.
  103.  *    If not possible, just define it (empty)
  104.  */
  105.  
  106. /*    A/UX CHANGE
  107.  *
  108.  *    The default (for Sys5) setpgrp() call does kinda work, but it carries
  109.  *    extra baggage... why bother?
  110.  */
  111. #include <sys/file.h>   /* for O_RDONLY */
  112. #include <sys/ioctl.h>  /* for TIOCNOTTY */
  113.  
  114. #undef DETATCH_TERMINAL    /* eliminate obnoxious compiler warnings */
  115. #define DETATCH_TERMINAL \
  116.     { int t = open("/dev/tty", O_RDONLY); \
  117.           if (t >= 0) ioctl(t, TIOCNOTTY, (int *)0), close(t); }
  118.  
  119.  
  120. /*
  121.  *    Define USE_MALLOC_H if the faster malloc() in -lmalloc should be used.
  122.  *    This requires that -lmalloc is added to EXTRA_LIB below.
  123.  *
  124.  *    You can tune the malloc package through the following definitions
  125.  *    according to the descriptions in malloc(3X):
  126.  */
  127.  
  128. /*    A/UX CHANGE
  129.  *    Use the malloc library. Don't fiddle with the tuning stuff though.
  130.  */
  131.  
  132. #define USE_MALLOC_H        /* */
  133.  
  134. #define MALLOC_GRAIN        sizeof(double)        /* M_GRAIN */
  135. #define MALLOC_MAXFAST    (MALLOC_GRAIN*4)    /* M_MXFAST */
  136. #define MALLOC_FASTBLOCKS    100            /* M_NLBLKS */
  137.  
  138. /*
  139.  *    Define standard compiler flags here:
  140.  */
  141.  
  142. /*    A/UX CHANGE
  143.  *    Use "-O2" for gcc. If you have an old gcc or just Apple C, use "-O".
  144.  *    A/UX 3.0 with gcc requires "-DUSG" because stdio doesn't define
  145.  *    L_ctermid, and stdio.h uses the existance of L_ctermid to decide
  146.  *    whether the code is V7 or USG. Without USG, termio doesn't get included
  147.  *    correctly. So force "USG" in, and everything works again.
  148.  *
  149.  *    The trouble is that gcc, by default, defines STDC (as 1) so
  150.  *    L_ctermid isn't defined in stdio.h which then doesn't make
  151.  *    curses.h load stuff correctly. We can wrap this in a header.
  152.  */
  153.  
  154. #ifdef __GNUC__
  155. #  if (__STDC__ == 1)
  156. #    define COMPILER_FLAGS -O2 -DUSG
  157. #  else
  158. #    define COMPILER_FLAGS -O2
  159. #  endif
  160. #else   /* remember that c89 exists too */
  161. #  if (__STDC__ == 1)
  162. #    define COMPILER_FLAGS -O -DUSG
  163. #  else
  164. #    define COMPILER_FLAGS -O
  165. #  endif
  166. #endif
  167.  
  168. /*
  169.  *    Define standard loader flags here: Force BSD compatibility stuff
  170.  */
  171.  
  172.  
  173. #define LOADER_FLAGS -lbsd
  174.  
  175. /*
  176.  *    If your system requires other libraries when linking nn
  177.  *    specify them here:
  178.  */
  179.  
  180. /*    A/UX CHANGE
  181.  *    Use -lmalloc to support the use of malloc configured above.
  182.  */
  183.  
  184. #define EXTRA_LIB -lmalloc
  185.  
  186. /*
  187.  *    Define NO_SIGINTERRUPT on BSD based systems which don't have
  188.  *    a siginterrupt() function, but provides an SV_INTERRUPT flag
  189.  *    in <signal.h>.
  190.  */
  191.  
  192. #define NO_SIGINTERRUPT      /* */
  193.  
  194. /*
  195.  *    Depending on whether compiled with cc, c89 or gcc, the type of
  196.  *    signal handlers differ... wrap it
  197.  */
  198.  
  199. #undef SIGNAL_HANDLERS_ARE_VOID
  200. #ifdef __STDC__
  201. #define SIGNAL_HANDLERS_ARE_VOID
  202. #endif
  203.  
  204. /*
  205.  * Misc stuff: A/UX has truncate() and can resize... Before RESIZING
  206.  * was defined in config.h but it's here now...
  207.  */
  208.  
  209. #define RESIZING
  210. #define HAVE_TRUNCATE
  211. #define HAVE_STRING_H
  212. #define HAVE_UNISTD_H
  213. #define HAVE_STDLIB_H
  214. #define HAVE_MEMORY_H
  215. #define HAVE_FCNTL_H
  216.