home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / smail-3.1.28 / pd / pathalias / config.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-12-08  |  3.1 KB  |  130 lines

  1. /* Smail SCCS ID: @(#)pd/pathalias/config.h    1.7 %G 01:08:05 */
  2. /* pathalias -- by steve bellovin, as told to peter honeyman */
  3.  
  4. /**************************************************************************
  5.  * +--------------------------------------------------------------------+ *
  6.  * |                    begin configuration section                     | *
  7.  * +--------------------------------------------------------------------+ *
  8.  **************************************************************************/
  9.  
  10. /*
  11.  * For smail3, get definitions from the defs.h file and convert them
  12.  * for use with pathalias
  13.  */
  14.  
  15. #include "defs.h"
  16. #undef lowercase    /* to avoid conflict with SMAIL macro */
  17.  
  18. #define SMAIL_3        /* changes for SMAIL-3 are #ifdef'd with this */
  19.  
  20. #undef STRCHR
  21. #define BZERO
  22. #undef MEMSET
  23.  
  24. #undef UNAME
  25. #undef GETHOSTNAME
  26. #ifdef HAVE_UNAME
  27. #define UNAME
  28. #else
  29. #ifdef HAVE_GETHOSTNAME
  30. #define GETHOSTNAME
  31. #endif
  32. #endif
  33.  
  34. /* default place for dbm output of makedb (or use -o at run-time) */
  35. #ifdef PATH_PATHS_FILE
  36. #define ALIASDB PATH_PATHS_FILE
  37. #else
  38. #define    ALIASDB    "/usr/local/lib/palias"
  39. #endif
  40.  
  41. /*
  42.  * pathalias defines an external named link, which clashes with
  43.  * the link system call.  The link system call may have been defined
  44.  * in one of the header files included by defs.h.
  45.  */
  46.  
  47. #define link    palias_link
  48.  
  49. /**************************************************************************
  50.  * +--------------------------------------------------------------------+ *
  51.  * |                    end of configuration section                    | *
  52.  * +--------------------------------------------------------------------+ *
  53.  **************************************************************************/
  54.  
  55.  
  56.  
  57. #ifdef MAIN
  58. #ifndef lint
  59. static char    *c_sccsid = "@(#)config.h    9.2 89/03/03";
  60. #endif /*lint*/
  61. #endif /*MAIN*/
  62.  
  63. /*
  64.  * malloc/free fine tuned for pathalias.
  65.  *
  66.  * MYMALLOC should work everwhere, so it's not a configuration
  67.  * option (anymore).  nonetheless, if you're getting strange
  68.  * core dumps (or panics!), comment out the following manifest,
  69.  * and use the inferior C library malloc/free.
  70.  */
  71. #if !defined(SMAIL_3) && !defined(NO_PALIAS_MYMALLOC)
  72. #define MYMALLOC    /**/
  73. #endif
  74.  
  75. #ifdef MYMALLOC
  76. #define malloc mymalloc
  77. #define calloc(n, s) malloc ((n)*(s))
  78. #define free(s)
  79. #define cfree(s)
  80. extern char *memget();
  81. #else /* !MYMALLOC */
  82. #if defined(SMAIL_3) && defined(ANSI_C) && !defined(NO_VOID_CALLOC)
  83. extern void *calloc();
  84. #else
  85. extern char *calloc();
  86. #endif
  87. #endif /* MYMALLOC */
  88.  
  89. #ifndef SMAIL_3
  90. #ifdef STRCHR
  91. #define index strchr
  92. #define rindex strrchr
  93. #else
  94. #define strchr index
  95. #define strrchr rindex
  96. #endif
  97. #endif    /* SMAIL_3 */
  98.  
  99. #ifdef BZERO
  100. #define strclear(s, n)    ((void) bzero((s), (n)))
  101. #else /*!BZERO*/
  102.  
  103. #ifdef MEMSET
  104. extern char    *memset();
  105. #define strclear(s, n)    ((void) memset((s), 0, (n)))
  106. #else /*!MEMSET*/
  107. extern void    strclear();
  108. #endif /*MEMSET*/
  109.  
  110. #endif /*BZERO*/
  111.  
  112. #if defined(SMAIL_3) && defined(ANSI_C) && !defined(NO_VOID_MALLOC)
  113. extern void    *malloc();
  114. #else
  115. extern char    *malloc();
  116. #endif
  117. #ifndef SMAIL_3
  118. extern char    *strcpy(), *index(), *rindex();
  119. #endif
  120.  
  121. #ifndef STATIC
  122.  
  123. #ifdef DEBUG
  124. #define STATIC extern
  125. #else /*DEBUG*/
  126. #define STATIC static
  127. #endif /*DEBUG*/
  128.  
  129. #endif /*STATIC*/
  130.