summaryrefslogtreecommitdiff
path: root/source4/heimdal_build
diff options
context:
space:
mode:
authorJames Peach <jpeach@samba.org>2007-01-07 04:43:04 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:37:10 -0500
commitf5acaea72794c5a63487f3710dbe7995ca2818a9 (patch)
tree3a9c1637768acc172b6459091c9c695045635f5b /source4/heimdal_build
parent42097e0b7d7f21f6602dd0924599f6d8d6eedae5 (diff)
downloadsamba-f5acaea72794c5a63487f3710dbe7995ca2818a9.tar.gz
samba-f5acaea72794c5a63487f3710dbe7995ca2818a9.tar.bz2
samba-f5acaea72794c5a63487f3710dbe7995ca2818a9.zip
r20592: Use the Heimdal copy of err.h only if the build host doesn't have it.
(This used to be commit 1e8c4847b829217beec62ba46c592da3fae8a73e)
Diffstat (limited to 'source4/heimdal_build')
-rw-r--r--source4/heimdal_build/config.m412
-rw-r--r--source4/heimdal_build/err.h9
2 files changed, 10 insertions, 11 deletions
diff --git a/source4/heimdal_build/config.m4 b/source4/heimdal_build/config.m4
index f2a1e2039a..8a69a880d4 100644
--- a/source4/heimdal_build/config.m4
+++ b/source4/heimdal_build/config.m4
@@ -31,12 +31,19 @@ esac
])
-
+dnl Not all systems have err.h, so we provide a replacement. Heimdal
+dnl unconditionally #includes <err.h>, so we need to create an err.h,
+dnl but we can't just have a static one because we don't want to use
+dnl it on systems that have a real err.h. If the system has a real
+dnl err.h, we should use that (eg. on Darwin, the declarations get
+dnl linker attributes added, so we can't guarantee that our local
+dnl declarations will be correct). Phew!
+AC_CHECK_HEADERS([err.h], [],
+ [ cp heimdal/lib/roken/err.hin heimdal_build/err.h ])
AC_CHECK_HEADERS([ \
crypt.h \
curses.h \
- err.h \
errno.h \
inttypes.h \
netdb.h \
@@ -89,6 +96,7 @@ AC_CHECK_FUNCS([ \
closefrom \
hstrerror \
err \
+ warn \
errx \
warnx \
flock \
diff --git a/source4/heimdal_build/err.h b/source4/heimdal_build/err.h
deleted file mode 100644
index bc56cc5a42..0000000000
--- a/source4/heimdal_build/err.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef _ERR_H
-#define _ERR_H 1
-
-void err(int eval, const char *format, ...);
-void errx(int eval, const char *format, ...);
-void warnx(const char *format, ...);
-void warn(const char *format, ...);
-
-#endif /* err.h */