summaryrefslogtreecommitdiff
path: root/lib/replace
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-25 14:32:58 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:27:06 +1000
commit48fd7802f9788e69ade6d252e1f718be6b77438c (patch)
tree97290f40a2413c93617518e458927899d7864b4d /lib/replace
parent7bb5be1324bbdc3af51ac21820f2f25e7df2fca9 (diff)
downloadsamba-48fd7802f9788e69ade6d252e1f718be6b77438c.tar.gz
samba-48fd7802f9788e69ade6d252e1f718be6b77438c.tar.bz2
samba-48fd7802f9788e69ade6d252e1f718be6b77438c.zip
s4-waf: replace stdint.h and stdbool.h on systems that don't have them
Diffstat (limited to 'lib/replace')
-rw-r--r--lib/replace/hdr_replace.h2
-rw-r--r--lib/replace/wscript12
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/replace/hdr_replace.h b/lib/replace/hdr_replace.h
new file mode 100644
index 0000000000..6cfa50f809
--- /dev/null
+++ b/lib/replace/hdr_replace.h
@@ -0,0 +1,2 @@
+/* this is a replacement header for a missing system header */
+#include "replace.h"
diff --git a/lib/replace/wscript b/lib/replace/wscript
index e457c5f845..8424319a1a 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -318,3 +318,15 @@ def build(bld):
bld.SAMBA_SUBSYSTEM('LIBREPLACE_GETPASS', 'getpass.c',
enabled=bld.CONFIG_SET('REPLACE_GETPASS'))
+
+ # build replacements for stdint.h and stdbool.h if needed
+ bld.SAMBA_GENERATOR('replace_stdint_h',
+ rule='cp ${SRC} ${TGT}',
+ source='hdr_replace.h',
+ target='stdint.h',
+ enabled = not bld.CONFIG_SET('HAVE_STDINT_H'))
+ bld.SAMBA_GENERATOR('replace_stdbool_h',
+ rule='cp ${SRC} ${TGT}',
+ source='hdr_replace.h',
+ target='stdbool.h',
+ enabled = not bld.CONFIG_SET('HAVE_STDBOOL_H'))