home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume22 / pathalias10 / part03 / config.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-06-07  |  2.4 KB  |  87 lines

  1. /* pathalias -- by steve bellovin, as told to peter honeyman */
  2.  
  3. /**************************************************************************
  4.  * +--------------------------------------------------------------------+ *
  5.  * |                    begin configuration section                     | *
  6.  * +--------------------------------------------------------------------+ *
  7.  **************************************************************************/
  8.  
  9. #undef STRCHR        /* have strchr -- system v and many others */
  10.  
  11. #undef UNAME        /* have uname() -- probably system v or 8th ed. */
  12. #undef MEMSET        /* have memset() -- probably system v or 8th ed. */
  13.  
  14. #define GETHOSTNAME    /* have gethostname() -- probably bsd */
  15. #define BZERO        /* have bzero() -- probably bsd */
  16.  
  17. /* default place for dbm output of makedb (or use -o at run-time) */
  18. #define    ALIASDB    "/usr/local/lib/palias"
  19.  
  20. /**************************************************************************
  21.  * +--------------------------------------------------------------------+ *
  22.  * |                    end of configuration section                    | *
  23.  * +--------------------------------------------------------------------+ *
  24.  **************************************************************************/
  25.  
  26.  
  27.  
  28. #ifdef MAIN
  29. #ifndef lint
  30. static char    *c_sccsid = "@(#)config.h    9.2 89/03/03";
  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. #define MYMALLOC    /**/
  43.  
  44. #ifdef MYMALLOC
  45. #define malloc mymalloc
  46. #define calloc(n, s) malloc ((n)*(s))
  47. #define free(s)
  48. #define cfree(s)
  49. extern char *memget();
  50. #else /* !MYMALLOC */
  51. extern char *calloc();
  52. #endif /* MYMALLOC */
  53.  
  54. #ifdef STRCHR
  55. #define index strchr
  56. #define rindex strrchr
  57. #else
  58. #define strchr index
  59. #define strrchr rindex
  60. #endif
  61.  
  62. #ifdef BZERO
  63. #define strclear(s, n)    ((void) bzero((s), (n)))
  64. #else /*!BZERO*/
  65.  
  66. #ifdef MEMSET
  67. extern char    *memset();
  68. #define strclear(s, n)    ((void) memset((s), 0, (n)))
  69. #else /*!MEMSET*/
  70. extern void    strclear();
  71. #endif /*MEMSET*/
  72.  
  73. #endif /*BZERO*/
  74.  
  75. extern char    *malloc();
  76. extern char    *strcpy(), *index(), *rindex();
  77.  
  78. #ifndef STATIC
  79.  
  80. #ifdef DEBUG
  81. #define STATIC extern
  82. #else /*DEBUG*/
  83. #define STATIC static
  84. #endif /*DEBUG*/
  85.  
  86. #endif /*STATIC*/
  87.