home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume12 / pathalias9 / part01 / config.h < prev    next >
Encoding:
C/C++ Source or Header  |  1987-10-08  |  2.0 KB  |  79 lines

  1. /* pathalias -- by steve bellovin, as told to peter honeyman */
  2.  
  3. #undef STRCHR        /* have strchr -- system v and many others */
  4.  
  5. #undef UNAME        /* have uname() -- probably system v or 8th ed. */
  6. #undef MEMSET        /* have memset() -- probably system v or 8th ed. */
  7.  
  8. #define GETHOSTNAME    /* have gethostname() -- probably bsd */
  9. #define BZERO        /* have bzero() -- probably bsd */
  10.  
  11. /* default place for dbm output of makedb (or use -o at run-time) */
  12. #define    ALIASDB    "/usr/local/lib/palias"
  13.  
  14.  
  15.  
  16. /**************************************************************************
  17.  *                                      *
  18.  * +--------------------------------------------------------------------+ *
  19.  * |                                    | *
  20.  * |            END OF CONFIGURATION SECTION            | *
  21.  * |                                    | *
  22.  * |                EDIT NO MORE                | *
  23.  * |                                    | *
  24.  * +--------------------------------------------------------------------+ *
  25.  *                                      *
  26.  **************************************************************************/
  27.  
  28. #ifdef MAIN
  29. #ifndef lint
  30. static char    *c_sccsid = "@(#)config.h    9.1 87/10/04";
  31. #endif /*lint*/
  32. #endif /*MAIN*/
  33.  
  34. /*
  35.  * malloc/free fine tuned for pathalias.
  36.  *
  37.  * MYMALLOC should work everwhere, so it's not a configuration
  38.  * option (anymore).  nonetheless, if you're getting strange
  39.  * core dumps (or panics!), comment out the following manifest,
  40.  * and use the inferior C library malloc/free.
  41.  *
  42.  * please report problems to citi!honey or honey@citi.umich.edu.
  43.  */
  44. #define MYMALLOC    /**/
  45.  
  46. #ifdef MYMALLOC
  47. #define malloc mymalloc
  48. #define calloc(n, s) malloc ((n)*(s))
  49. #define free(s)
  50. #define cfree(s)
  51. extern char *memget();
  52. #else /* !MYMALLOC */
  53. extern char *calloc();
  54. #endif /* MYMALLOC */
  55.  
  56. #ifdef STRCHR
  57. #define index strchr
  58. #define rindex strrchr
  59. #else
  60. #define strchr index
  61. #define strrchr rindex
  62. #endif
  63.  
  64. #ifdef BZERO
  65. #define strclear(s, n)    ((void) bzero((s), (n)))
  66. #else /*!BZERO*/
  67.  
  68. #ifdef MEMSET
  69. extern char    *memset();
  70. #define strclear(s, n)    ((void) memset((s), 0, (n)))
  71. #else /*!MEMSET*/
  72. extern void    strclear();
  73. #endif /*MEMSET*/
  74.  
  75. #endif /*BZERO*/
  76.  
  77. extern char    *malloc();
  78. extern char    *strcpy(), *index(), *rindex();
  79.