OSSP CVS Repository

ossp - Check-in [1481]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 1481
Date: 2002-Jan-02 14:20:11 (local)
2002-Jan-02 13:20:11 (UTC)
User:rse
Branch:
Comment: first cut for PF_XXX usage
Tickets:
Inspections:
Files:
ossp-pkg/sa/TODO      1.31 -> 1.32     3 inserted, 0 deleted
ossp-pkg/sa/sa.c      1.44 -> 1.45     12 inserted, 1 deleted

ossp-pkg/sa/TODO 1.31 -> 1.32

--- TODO 2001/10/31 20:07:22     1.31
+++ TODO 2002/01/02 13:20:11     1.32
@@ -8,6 +8,9 @@
 CANDO
 -----
 
+o Consistently use PF_XXX instead of AF_XXX whenever not directly
+  address related things are done in order to even closer conform to POSIX.
+
 o Support for newer DNS Resolving Functions.
 
   In IPv6 land there are usually the newer DNS resolving functions


ossp-pkg/sa/sa.c 1.44 -> 1.45

--- sa.c 2002/01/02 13:08:48     1.44
+++ sa.c 2002/01/02 13:20:11     1.45
@@ -47,7 +47,7 @@
 #include <sys/time.h>    /* for "struct timeval" */
 #include <sys/un.h>      /* for "struct sockaddr_un" */
 #include <netinet/in.h>  /* for "struct sockaddr_in[6]" */
-#include <sys/socket.h>  /* for "AF_XXX" and "SOCK_XXX" */
+#include <sys/socket.h>  /* for "PF_XXX", "AF_XXX" and "SOCK_XXX" */
 #include <arpa/inet.h>   /* for "inet_XtoX" */
 
 /* include own API header */
@@ -66,6 +66,17 @@
 #define AF_LOCAL AF_UNIX
 #endif
 
+/* backward compatibility for PF_XXX (still unused) */
+if !defined(PF_LOCAL) && defined(AF_LOCAL)
+#define PF_LOCAL AF_LOCAL
+#endif
+if !defined(PF_INET) && defined(AF_INET)
+#define PF_INET AF_INET
+#endif
+if !defined(PF_INET6) && defined(AF_INET6)
+#define PF_INET6 AF_INET6
+#endif
+
 /* backward compatibility for ssize_t */
 #if defined(HAVE_CONFIG_H) && !defined(HAVE_SSIZE_T)
 #define ssize_t long

CVSTrac 2.0.1