diff options
author | hubertf <hubertf> | 1998-10-02 06:47:29 +0000 |
---|---|---|
committer | hubertf <hubertf> | 1998-10-02 06:47:29 +0000 |
commit | f93fcfa9f622bf79518b28762ba69821c606e4bc (patch) | |
tree | 5332efacb40d73fb856bb11aacf99301a21cb08f /mbone | |
parent | ae959ded498ae9c4afe576ace7ec7ddf91090ea3 (diff) | |
download | pkgsrc-f93fcfa9f622bf79518b28762ba69821c606e4bc.tar.gz |
work around <sys/inttypes.h> not present in 1.3
Diffstat (limited to 'mbone')
-rw-r--r-- | mbone/sdr/Makefile | 11 | ||||
-rw-r--r-- | mbone/sdr/patches/patch-ac | 21 | ||||
-rw-r--r-- | mbone/sdr/patches/patch-ad | 29 |
3 files changed, 39 insertions, 22 deletions
diff --git a/mbone/sdr/Makefile b/mbone/sdr/Makefile index 879e1eb5e5a..646c55c1659 100644 --- a/mbone/sdr/Makefile +++ b/mbone/sdr/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 1998/08/20 15:17:11 tsarna Exp $ +# $NetBSD: Makefile,v 1.11 1998/10/02 06:47:29 hubertf Exp $ # FreeBSD Id: Makefile,v 1.6 1997/10/15 20:35:20 fenner Exp # @@ -17,9 +17,10 @@ NO_WRKSUBDIR= yes USE_GMAKE= yes USE_X11= yes -# src/libs.tcl is autogenerated from the tcl/tk installed on the -# build system, so we shouldn't use the one in the distribution. -post-extract: - -@rm ${WRKSRC}/src/libs.tcl +_INTTYPES!= if [ -e /usr/include/sys/inttypes.h ]; then echo "Exists"; else echo "No go"; fi + +.if (${_INTTYPES} == "Exists") +CFLAGS+= -DHAVE_SYS_INTTYPES_H +.endif .include "../../mk/bsd.pkg.mk" diff --git a/mbone/sdr/patches/patch-ac b/mbone/sdr/patches/patch-ac index b7c83af0b19..9288889d95b 100644 --- a/mbone/sdr/patches/patch-ac +++ b/mbone/sdr/patches/patch-ac @@ -1,20 +1,27 @@ -$NetBSD: patch-ac,v 1.3 1998/09/13 18:02:10 garbled Exp $ ---- src/iohandler.c.orig Sun Sep 13 10:28:50 1998 -+++ src/iohandler.c Sun Sep 13 10:30:44 1998 -@@ -43,6 +43,7 @@ +$NetBSD: patch-ac,v 1.4 1998/10/02 06:47:29 hubertf Exp $ +--- src/iohandler.c.orig Thu Jan 8 20:40:17 1998 ++++ src/iohandler.c Fri Oct 2 08:26:48 1998 +@@ -43,6 +43,9 @@ #include <time.h> #include <winsock.h> #endif ++#ifdef HAVE_SYS_INTTYPES_H +#include <sys/inttypes.h> ++#endif #include <tk.h> #ifdef WIN32 #define WM_WSOCK_READY WM_USER+123 -@@ -135,7 +136,7 @@ +@@ -134,8 +137,13 @@ + } sockproc[fd] = callback; #else - Tcl_CreateFileHandler(fd, -- mask, callback, (ClientData)fd); ++#ifdef HAVE_SYS_INTTYPES_H ++ Tcl_CreateFileHandler(fd, + mask, callback, (ClientData)(intptr_t)fd); ++#else + Tcl_CreateFileHandler(fd, + mask, callback, (ClientData)fd); ++#endif #endif } diff --git a/mbone/sdr/patches/patch-ad b/mbone/sdr/patches/patch-ad index ad8bc96c5d7..65e4fb1091a 100644 --- a/mbone/sdr/patches/patch-ad +++ b/mbone/sdr/patches/patch-ad @@ -1,26 +1,35 @@ -$NetBSD: patch-ad,v 1.3 1998/09/13 18:02:10 garbled Exp $ ---- src/sd_listen.c.orig Sun Sep 13 10:34:47 1998 -+++ src/sd_listen.c Sun Sep 13 10:37:01 1998 -@@ -316,10 +316,10 @@ +$NetBSD +--- src/sd_listen.c.orig Thu Jan 8 20:39:21 1998 ++++ src/sd_listen.c Fri Oct 2 08:30:50 1998 +@@ -316,11 +316,19 @@ if (strncmp(k1, "k=", 2)==0) { -- if ((u_int)k2>=(u_int)k1+2) ++#ifdef HAVE_SYS_INTTYPES_H + if ((uintptr_t)k2>=(uintptr_t)k1+2) - { -- memcpy(key, k1+2, (u_int)k2-((u_int)k1+1)); -- key[(u_int)k2-((u_int)k1+1)]='\0'; ++ { + memcpy(key, k1+2, (uintptr_t)k2-((uintptr_t)k1+1)); + key[(uintptr_t)k2-((uintptr_t)k1+1)]='\0'; ++ } ++#else + if ((u_int)k2>=(u_int)k1+2) + { + memcpy(key, k1+2, (u_int)k2-((u_int)k1+1)); + key[(u_int)k2-((u_int)k1+1)]='\0'; } ++#endif else { -@@ -648,7 +648,7 @@ + key[0]='\0'; +@@ -648,7 +656,11 @@ struct timeval tv; unsigned long src, hfrom; char *data; -- int ix = rfd2sock[PTOI(fd)]; ++#ifdef HAVE_SYS_INTTYPES_H + intptr_t ix = rfd2sock[PTOI(fd)]; ++#else + int ix = rfd2sock[PTOI(fd)]; ++#endif fromlen=sizeof(struct sockaddr); |