Check-in Number:
|
1150 | |
Date: |
2001-Oct-10 21:32:29 (local)
2001-Oct-10 19:32:29 (UTC) |
User: | rse |
Branch: | |
Comment: |
support for ssize_t fallback |
Tickets: |
|
Inspections: |
|
Files: |
|
ossp-pkg/sa/acconfig.h 1.1 -> 1.2
--- acconfig.h 2001/10/08 14:47:30 1.1
+++ acconfig.h 2001/10/10 19:32:29 1.2
@@ -2,3 +2,5 @@
/* whether socklen_t exists */
#undef HAVE_SOCKLEN_T
+/* whether ssize_t exists */
+#undef HAVE_SSSIZE_T
|
|
ossp-pkg/sa/sa.ac 1.5 -> 1.6
--- sa.ac 2001/10/08 15:01:26 1.5
+++ sa.ac 2001/10/10 19:32:29 1.6
@@ -73,5 +73,6 @@
dnl # check for network/socket size type
SA_CHECK_TYPEDEF(socklen_t, sys/socket.h)
+ SA_CHECK_TYPEDEF(ssize_t, sys/types.h)
])
|
|
ossp-pkg/sa/sa.c 1.29 -> 1.30
--- sa.c 2001/10/10 15:40:00 1.29
+++ sa.c 2001/10/10 19:32:29 1.30
@@ -53,6 +53,24 @@
/* include own API header */
#include "sa.h"
+/* boolean values */
+#ifndef FALSE
+#define FALSE (0)
+#endif
+#ifndef TRUE
+#define TRUE (!FALSE)
+#endif
+
+/* backward compatibility for AF_LOCAL */
+#if !defined(AF_LOCAL) && defined(AF_UNIX)
+#define AF_LOCAL AF_UNIX
+#endif
+
+/* backward compatibility for ssize_t */
+#if defined(HAVE_CONFIG_H) && !defined(HAVE_SSIZE_T)
+#define ssize_t long
+#endif
+
/* system call structure declaration macros */
#define SA_SC_DECLARE_0(rc_t, fn) \
struct { \
@@ -180,23 +198,10 @@
socklen_t slBuf; /* the length of "struct sockaddr_xx" */
};
-/* boolean values */
-#ifndef FALSE
-#define FALSE (0)
-#endif
-#ifndef TRUE
-#define TRUE (!FALSE)
-#endif
-
/* handy struct timeval check */
#define SA_TVISZERO(tv) \
((tv).tv_sec == 0 && (tv).tv_usec == 0)
-/* backward compatibility for AF_LOCAL */
-#if !defined(AF_LOCAL) && defined(AF_UNIX)
-#define AF_LOCAL AF_UNIX
-#endif
-
/* convert Internet address from presentation to network format */
static int sa_inet_pton(int family, const char *strptr, void *addrptr)
{
|
|