Bug 7461 - stdbool.h included unconditionally
Summary: stdbool.h included unconditionally
Status: RESOLVED INVALID
Alias: None
Product: Samba 3.5
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.5.3
Hardware: All Other
: P3 normal
Target Milestone: ---
Assignee: Björn Jacke
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-27 10:05 UTC by Joachim Schmitz (mail address dead)
Modified: 2010-05-30 13:33 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joachim Schmitz (mail address dead) 2010-05-27 10:05:37 UTC
...lib/tevent/tevent.h #include's <stdbool.h> unconditionally. It should only do so if HAVE_STDBOOL_H is #define'd. Patch:

diff -u ./lib/tevent/tevent.h.orig ./lib/tevent/tevent.h
--- ./lib/tevent/tevent.h.orig  2010-05-17 06:51:23.000000000 -0500
+++ ./lib/tevent/tevent.h       2010-05-26 09:59:24.000000000 -0500
@@ -31,7 +31,9 @@
 #include <stdint.h>
 #include <talloc.h>
 #include <sys/time.h>
+#ifdef HAVE_STDBOOL_H
 #include <stdbool.h>
+#endif

 struct tevent_context;
 struct tevent_ops;

Bye, Jojo
Comment 1 Joachim Schmitz (mail address dead) 2010-05-27 10:08:12 UTC
same story in ...lib/util/tevent_ntstatus.h. Patch:

diff -u ./lib/util/tevent_ntstatus.h.orig ./lib/util/tevent_ntstatus.h
--- ./lib/util/tevent_ntstatus.h.orig   2010-05-17 06:51:23.000000000 -0500
+++ ./lib/util/tevent_ntstatus.h        2010-05-26 10:00:06.000000000 -0500
@@ -21,7 +21,9 @@
 #define _TEVENT_NTSTATUS_H

 #include <stdint.h>
+#ifdef HAVE_STDBOOL_H
 #include <stdbool.h>
+#endif
 #include "../libcli/util/ntstatus.h"
 #include "../tevent/tevent.h"

Bye, Jojo
Comment 2 Stefan Metzmacher 2010-05-27 10:35:23 UTC
libreplace should provide stdint.h and stdbool.h if the system doesn't have them.
Comment 3 Joachim Schmitz (mail address dead) 2010-05-27 11:31:12 UTC
(In reply to comment #2)
> libreplace should provide stdint.h and stdbool.h if the system doesn't have
> them.

'Should' seems to be the right word. Without that patch I got a compiler error due to stdbool.h not found.

Bye, Jojo

Comment 4 Joachim Schmitz (mail address dead) 2010-05-30 13:33:18 UTC
It seems that indeed the stdbool.h detection of configure does work correcly, as an attempt to reproduce the compiler error failed, so I must have done something wrong earlier, possibly I did two 'configure' runs without a 'make clean' in between (See also bug 7477.). Guess we can close this bug report, looks like an EBKAC (Error Between Keyboard And Chair) after all...


Bye, Jojo