summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>2000-05-08 20:32:35 +0000
committerwtc%netscape.com <devnull@localhost>2000-05-08 20:32:35 +0000
commit80e1874978037be5f31956c8b2e4e993f2f470b8 (patch)
tree552cc534d7ada5f22ca8b3402ccbacad971ab107
parenta7f21e0c4a34057033bb858244e6245f1996a7b9 (diff)
downloadnspr-hg-80e1874978037be5f31956c8b2e4e993f2f470b8.tar.gz
Bugzilla bug #36718: several socket options become enums in Mac OS
Universal Interfaces 3.3. Define them as macros so that our code, which assumes all socket options are macros, continues to work. Modified files: _macos.h, prmapopt.c
-rw-r--r--pr/include/md/_macos.h13
-rw-r--r--pr/src/io/prmapopt.c2
2 files changed, 14 insertions, 1 deletions
diff --git a/pr/include/md/_macos.h b/pr/include/md/_macos.h
index cf38977f..5bb4d72d 100644
--- a/pr/include/md/_macos.h
+++ b/pr/include/md/_macos.h
@@ -382,6 +382,19 @@ extern char* _MD_ReadDir(struct _MDDir *md,PRIntn flags);
** Socket I/O Related definitions
*/
+#if UNIVERSAL_INTERFACES_VERSION >= 0x0330
+/* In Universal Interfaces 3.3 and later, these are enums. */
+#define IP_TTL IP_TTL
+#define IP_TOS IP_TOS
+#define IP_ADD_MEMBERSHIP IP_ADD_MEMBERSHIP
+#define IP_DROP_MEMBERSHIP IP_DROP_MEMBERSHIP
+#define IP_MULTICAST_IF IP_MULTICAST_IF
+#define IP_MULTICAST_TTL IP_MULTICAST_TTL
+#define IP_MULTICAST_LOOP IP_MULTICAST_LOOP
+#define TCP_NODELAY TCP_NODELAY
+#define TCP_MAXSEG TCP_MAXSEG
+#endif
+
#define _MD_SOCKET _MD_socket
#define _MD_BIND _MD_bind
#define _MD_LISTEN _MD_listen
diff --git a/pr/src/io/prmapopt.c b/pr/src/io/prmapopt.c
index 2b3dd7b8..075d3a6a 100644
--- a/pr/src/io/prmapopt.c
+++ b/pr/src/io/prmapopt.c
@@ -388,7 +388,7 @@ PRStatus PR_CALLBACK _PR_SocketSetSocketOption(PRFileDesc *fd, const PRSocketOpt
* Some platforms, such as NCR 2.03, don't have TCP_NODELAY defined
* in <netinet/tcp.h>
*/
-#if !defined(NCR) && !(defined(XP_MAC) && (UNIVERSAL_INTERFACES_VERSION >= 0x0330))
+#if !defined(NCR)
#if !defined(TCP_NODELAY)
#error "TCP_NODELAY is not defined"
#endif