summaryrefslogtreecommitdiff
path: root/security/libident/patches/patch-ab
blob: 12815258bbf45b19d214a0fdca6e4bae4e5701a2 (plain)
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
$NetBSD: patch-ab,v 1.2 1999/03/12 15:58:09 tron Exp $

--- ident.h.orig	Thu Nov 23 23:44:36 1995
+++ ident.h	Fri Mar 12 16:56:54 1999
@@ -13,10 +13,8 @@
 #endif
 
 /* Sigh */
-#ifdef __STDC__
-#  if __STDC__ == 1
-#    define IS_STDC 1
-#  endif
+#if (0 - __STDC__) <= -1
+#  define IS_STDC 1
 #endif
 
 #ifdef __P
@@ -96,34 +94,22 @@
 #  include <bstring.h>
 #endif
 #include <sys/types.h>
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+#  include <sys/time.h>
+# else
+#  include <time.h>
+# endif
+#endif
 #include <netinet/in.h>
-#include <sys/time.h>
 
 #if defined(VMS) && !defined(FD_SETSIZE)
 #  define FD_SETSIZE 64
 #endif
 
-/*
- * Sigh, GCC v2 complains when using undefined struct tags
- * in function prototypes...
- */
-#if defined(__GNUC__) && !defined(INADDR_ANY)
-#  define __STRUCT_IN_ADDR_P	void *
-#else
-#  define __STRUCT_IN_ADDR_P	struct in_addr *
-#endif
-
-#if defined(__GNUC__) && !defined(DST_NONE)
-#  define __STRUCT_TIMEVAL_P	void *
-#else
-#  define __STRUCT_TIMEVAL_P	struct timeval *
-#endif
-
-#if defined(__sgi) && defined(_POSIX_SOURCE)
-#  undef  __STRUCT_TIMEVAL_P
-#  define __STRUCT_TIMEVAL_P	void *
-#endif
-	
 #ifndef IDBUFSIZE
 #  define IDBUFSIZE 2048
 #endif
@@ -149,19 +135,19 @@
 /* Low-level calls and macros */
 #define id_fileno(ID)	((ID)->fd)
 
-extern ident_t * id_open __P((__STRUCT_IN_ADDR_P laddr,
-			   __STRUCT_IN_ADDR_P faddr,
-			   __STRUCT_TIMEVAL_P timeout));
+extern ident_t * id_open __P((struct in_addr * laddr,
+			   struct in_addr * faddr,
+			   struct timeval * timeout));
   
 extern int    id_close __P((ident_t *id));
   
 extern int    id_query __P((ident_t *id,
 			    int lport,
 			    int fport,
-			    __STRUCT_TIMEVAL_P timeout));
+			    struct timeval * timeout));
   
 extern int    id_parse __P((ident_t *id,
-			    __STRUCT_TIMEVAL_P timeout,
+			    struct timeval * timeout,
 			    int *lport,
 			    int *fport,
 			    char **identifier,
@@ -174,7 +160,7 @@
 
 extern char  *ident_id __P((int fd, int timeout));
 
-extern IDENT *ident_query __P(( __STRUCT_IN_ADDR_P laddr, __STRUCT_IN_ADDR_P raddr, int lport, int rport, int timeout));
+extern IDENT *ident_query __P(( struct in_addr * laddr, struct in_addr * raddr, int lport, int rport, int timeout));
 
 extern void   ident_free __P((IDENT *id));