summaryrefslogtreecommitdiff
path: root/pkgtools/posix_headers
diff options
context:
space:
mode:
authortnn <tnn>2007-04-28 21:03:56 +0000
committertnn <tnn>2007-04-28 21:03:56 +0000
commitfa8e6f73a4c5ce8e59e2807610c8df0ad2aaa28a (patch)
tree3f3a9706e614fb750cb99a2a9a0669a6bbe67528 /pkgtools/posix_headers
parentcb992e95f79034c2d05ce77104583a878ebc4018 (diff)
downloadpkgsrc-fa8e6f73a4c5ce8e59e2807610c8df0ad2aaa28a.tar.gz
Correct resolver prototypes. Add strto(u)ll glue. Provide inlined setenv(3)
Diffstat (limited to 'pkgtools/posix_headers')
-rw-r--r--pkgtools/posix_headers/Makefile8
-rw-r--r--pkgtools/posix_headers/buildlink3.mk4
-rw-r--r--pkgtools/posix_headers/files/resolv.h8
-rw-r--r--pkgtools/posix_headers/files/stdlib.h26
4 files changed, 36 insertions, 10 deletions
diff --git a/pkgtools/posix_headers/Makefile b/pkgtools/posix_headers/Makefile
index e424a49b38b..853d07309d4 100644
--- a/pkgtools/posix_headers/Makefile
+++ b/pkgtools/posix_headers/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.4 2007/04/27 13:54:24 tnn Exp $
+# $NetBSD: Makefile,v 1.5 2007/04/28 21:03:56 tnn Exp $
DISTNAME= posix_headers-0.4
-PKGREVISION= 2
+PKGREVISION= 5
CATEGORIES= pkgtools
MASTER_SITES= # empty
DISTFILES= # empty
@@ -18,8 +18,8 @@ ONLY_FOR_PLATFORM= HPUX-11.11-* # add more as needed
PLIST_SRC= ${WRKDIR}/PLIST_SRC
-POSIX_HEADERS.HPUX= sys/select.h stdint.h math.h resolv.h
-SUBST_HEADERS.HPUX= math.h resolv.h
+POSIX_HEADERS.HPUX= sys/select.h stdint.h math.h resolv.h stdlib.h
+SUBST_HEADERS.HPUX= math.h resolv.h stdlib.h
BUILDING_POSIX_HEADERS= yes
diff --git a/pkgtools/posix_headers/buildlink3.mk b/pkgtools/posix_headers/buildlink3.mk
index e557837cad7..053d8407463 100644
--- a/pkgtools/posix_headers/buildlink3.mk
+++ b/pkgtools/posix_headers/buildlink3.mk
@@ -1,6 +1,6 @@
-# $NetBSD: buildlink3.mk,v 1.2 2007/04/27 13:54:24 tnn Exp $
+# $NetBSD: buildlink3.mk,v 1.3 2007/04/28 21:03:56 tnn Exp $
-BUILD_DEPENDS+= posix_headers>=0.4nb2:../../pkgtools/posix_headers
+BUILD_DEPENDS+= posix_headers>=0.4nb5:../../pkgtools/posix_headers
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
POSIX_HEADERS_BUILDLINK3_MK:= ${POSIX_HEADERS_BUILDLINK3_MK}+
diff --git a/pkgtools/posix_headers/files/resolv.h b/pkgtools/posix_headers/files/resolv.h
index a61d1a2a4c0..7fdf864aee5 100644
--- a/pkgtools/posix_headers/files/resolv.h
+++ b/pkgtools/posix_headers/files/resolv.h
@@ -1,16 +1,16 @@
-/* $NetBSD: resolv.h,v 1.1 2007/04/27 13:54:24 tnn Exp $ */
+/* $NetBSD: resolv.h,v 1.2 2007/04/28 21:03:56 tnn Exp $ */
#ifndef _PKGSRC_RESOLV_H_
#define _PKGSRC_RESOLV_H_
#include "@REAL_HEADER@"
#ifdef __hpux
/* Missing prototypes. We have them in libc though. */
-ssize_t res_query(char*, int, int, u_char, int);
-ssize_t res_search(char*, int, int, u_char, int);
+ssize_t res_query(char*, int, int, u_char*, int);
+ssize_t res_search(char*, int, int, u_char*, int);
ssize_t res_mkquery(int, const char*, int, int, const char*, int,\
const char*, char*, int);
ssize_t res_send(const char*, ssize_t, char*, int);
int res_init();
ssize_t dn_comp(const char*, u_char*, ssize_t, u_char**, u_char**);
-ssize_t dn_expand(const u_char*, const u_char*, u_char*, int);
+ssize_t dn_expand(const u_char*, const u_char*, const u_char*, u_char*, int);
#endif /* __hpux */
#endif /* _PKGSRC_RESOLV_H_ */
diff --git a/pkgtools/posix_headers/files/stdlib.h b/pkgtools/posix_headers/files/stdlib.h
new file mode 100644
index 00000000000..49939b6c9f5
--- /dev/null
+++ b/pkgtools/posix_headers/files/stdlib.h
@@ -0,0 +1,26 @@
+/* $NetBSD: stdlib.h,v 1.1 2007/04/28 21:03:56 tnn Exp $ */
+#ifndef _PKGSRC_STDLIB_H_
+#define _PKGSRC_STDLIB_H_
+#include "@REAL_HEADER@"
+#ifdef __hpux
+/* What were they thinking? */
+#include <inttypes.h>
+#define strtoll __strtoll
+#define strtoull __strtoull
+#include <string.h>
+#include <stdio.h>
+/* provide a setenv(3) implementation */
+static __inline int setenv(const char *name, const char *value, int overwrite);
+static __inline int setenv(const char *name, const char *value, int overwrite) {
+ char *c;
+ int ret;
+ if (!overwrite && getenv(name)) return(-1);
+ c = malloc(strlen(name)+strlen(value)+2);
+ if(!c) return(-1);
+ sprintf(c, "%s=%s", name, value);
+ ret = putenv(c);
+ free(c);
+ return(ret);
+}
+#endif /* __hpux */
+#endif /* _PKGSRC_STDLIB_H_ */