File: hostenv.h

package info (click to toggle)
zmailer 2.99.51.52pre3-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 16,596 kB
  • ctags: 7,422
  • sloc: ansic: 90,470; sh: 3,608; makefile: 2,784; perl: 1,585; python: 115; awk: 22
file content (81 lines) | stat: -rw-r--r-- 1,552 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#ifndef	__HOSTENV__
#define	__HOSTENV__

/* #ifdef HAVE_CONFIG_H */
#include "config.h" /* We have this always.. */
/* #endif */

#ifdef HAVE_FCNTL_H
# define FCNTL_H <fcntl.h>
#endif

#ifdef HAVE_STRING_H
#include <string.h>
#endif

#ifdef __GNUC__
# define alloca __builtin_alloca
# define HAVE_ALLOCA 1
#else
# if HAVE_ALLOCA_H
#  include <alloca.h>
#  define HAVE_ALLOCA 1
# else
#  ifdef _AIX
 #pragma alloca
#   define HAVE_ALLOCA 1
#  else
	/* no alloca() .. */
#  endif
# endif
#endif

#ifdef HAVE_ALLOCA
# define USE_ALLOCA HAVE_ALLOCA
#endif

#include <sys/types.h>
#ifdef __linux__ /* Linux libc-4 needs this, libc-5 doesn't.. */
# include <linux/limits.h>
#endif
#include <sys/param.h> /* Troublepotential: If somebody does not have it ? */
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#endif

/* There are systems which store the stdio fp contained fileno into
   a SIGNED CHARACTER, and simple-minded  fileno() will therefore
   pick an FD of over 127 as negative number..  We provide a wrapper
   for such in case by case basis.. */

#ifndef FILENO
# if defined(sun) && !defined(__svr4__)
#  define FILENO(x) (((unsigned)fileno(x)) & 0xFF)
# else
#  define FILENO(x) fileno(x)
# endif
#endif

#ifndef	__
# ifndef __STDC__
#  define __(x) ()
#  ifdef __GNUC__
#   ifndef const
#    define const    __const
#   endif
#   define volatile __volatile
#  else
#   define const
#   define volatile
#  endif
# else
#  define __(x) x
# endif
#endif

#include "sysprotos.h"

#endif	/* !__HOSTENV__ */