Closed
Bug 256877
Opened 22 years ago
Closed 22 years ago
nptypes.h for OpenBSD 3.5 (no stdint.h)
Categories
(Core Graveyard :: Plug-ins, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: julien.dusser, Unassigned)
Details
(Keywords: fixed-aviary1.0)
Attachments
(1 file)
|
1.44 KB,
patch
|
jst
:
review+
jst
:
superreview+
jst
:
approval-aviary+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.7.2) Gecko/20040803
Build Identifier: rv1.8a3
IN modules/plugin/base/public/nptypes.h
61 #elif defined(bsdi) || defined(FREEBSD)
62 /*
63 * BSD/OS and FreeBSD ship sys/types.h that define int32_t and u_int32_t.
64 */
65 #include <sys/types.h>
66
67 /*
68 * BSD/OS ships no header that defines uint32_t, nor bool (for C)
69 */
70 #if defined(bsdi)
71 typedef u_int32_t uint32_t;
72
73 #if !defined(__cplusplus)
74 typedef int bool;
75 #endif
76 #else
77 /*
78 * FreeBSD defines uint32_t and bool.
79 */
80 #include <inttypes.h>
81 #include <stdbool.h>
82 #endif
83 #else
bsdi is not defined under openBSD and stdint.h doesn't exist
So i put:
61 #elif defined(bsdi) || defined(FREEBSD) || defined(OPENBSD)
62 /*
63 * BSD/OS and FreeBSD ship sys/types.h that define int32_t and u_int32_t.
64 */
65 #include <sys/types.h>
66
67 /*
68 * BSD/OS ships no header that defines uint32_t, nor bool (for C)
69 */
70 #if defined(bsdi) || defined(OPENBSD)
71 typedef u_int32_t uint32_t;
72
73 #if !defined(__cplusplus)
74 typedef int bool;
75 #endif
76 #else
77 /*
78 * FreeBSD defines uint32_t and bool.
79 */
80 #include <inttypes.h>
81 #include <stdbool.h>
82 #endif
83 #else
Reproducible: Always
Steps to Reproduce:
1.
2.
3.
OpenBSD's inttypes:
http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/src/include/inttypes.h?rev=1.5&content-type=text/plain
and its stdbool (which does provide a bool type as a macro which can be
redefined):
http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/src/include/stdbool.h?rev=1.2&content-type=text/plain
Reporter's changes revised as follows:
To be "correct" with handling the bool, i.e. using OpenBSD's include, there
should be more conditionals in there (yuck).
The comments have been tweaked also.
I don't have an OpenBSD box to test this on, however (but it's free from issues
that'd prevent a successful FreeBSD build:)
ju1i3n, if you're interested in trying this patch out, please do.
Summary: nptypes.h for OpenBSD 3.5 → nptypes.h for OpenBSD 3.5 (no stdint.h)
Comment 2•22 years ago
|
||
Comment on attachment 157017 [details] [diff] [review]
reporter's changes with tweaks
r+sr+a=jst
Attachment #157017 -
Flags: superreview+
Attachment #157017 -
Flags: review+
Attachment #157017 -
Flags: approval-aviary+
Comment 3•22 years ago
|
||
Fix checked in on trunk and aviary branch.
Updated•4 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•