File: sysdep.h

package info (click to toggle)
aime 0.60.3-7
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 6,016 kB
  • ctags: 5,217
  • sloc: cpp: 77,611; ansic: 3,765; sh: 2,996; makefile: 234; sed: 93
file content (131 lines) | stat: -rw-r--r-- 2,574 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
#ifndef __AIME_SYSDEP_H_
#define __AIME_SYSDEP_H_


#define __USE_XOPEN
#define AIME_DAEMONIZABLE
#define AIME_SIGNALS

#define STRNCASECMP( a, b, n )   strncasecmp( (a), (b), (n) )
#define STRCASECMP( a, b )   strcasecmp( (a), (b) )
#define BZERO( a, n )   bzero( (a), (n) )
#define RAISE( n )   raise( n )
#define STRSEP( a, b )   strsep( (a), (b) )
#define VSNPRINTF( b, s, f, a )   vsnprintf( (b), (s), (f), (a) )
#define SNPRINTF   snprintf


#if defined( __CYGWIN__ )
// ifdef CYGWIN must come before ifdef WIN32

#include <stdlib.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <netdb.h>
#include <rpc.h>
#include <signal.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <time.h>
#include <unistd.h>

#include <arpa/inet.h>
#include <arpa/telnet.h>

#include <netinet/in.h>

#include <sys/param.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>



#elif defined( linux )

#include <stdlib.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <netdb.h>
#include <signal.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <time.h>
#include <unistd.h>

#include <arpa/inet.h>
#include <arpa/telnet.h>

#include <netinet/in.h>

#include <sys/param.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>

#include <asm/param.h>

#include <rpc/types.h>



#elif defined( WIN32 )

#undef AIME_DAEMONIZABLE
#undef AIME_SIGNALS

#define AIME_WIN32

#define MAXHOSTNAMELEN  64
#define IAC             255     /* interpret as command: */
#define WONT            252     /* I won't use option */
#define WILL            251     /* I will use option */
#define TELOPT_ECHO     1       /* echo */
#define TELOPT_NAOFFD   13      /* negotiate about formfeed disposition */
#define TELOPT_NAOCRD   10      /* negotiate about CR disposition */

#undef STRNCASECMP
#define STRNCASECMP( a, b, n )   strnicmp( (a), (b), (n) )

#undef STRCASECMP
#define STRCASECMP( a, b )   stricmp( (a), (b) )

#undef BZERO
#define BZERO( a, n )   memset( (a), 0, (n) )

#undef RAISE
#define RAISE( a )   exit( a )

#undef STRSEP
#define STRSEP( a, b )   str_sep( (a), (b) )

#undef VSNPRINTF
#define VSNPRINTF( b, s, f, a )   _vsnprintf( (b), (s), (f), (a) )

#undef SNPRINTF
#define SNPRINTF   _snprintf

#include <afxwin.h>
#include <stdio.h>
#include <string.h>
#include <time.h>

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


#else
#error "Unknown platform!"
#endif


#endif // __AIME_SYSDEP_H_