Opened 16 years ago
Closed 14 years ago
#203 closed defect (fixed)
MIN/MAX macros
Reported by: | KO Myung-Hun | Owned by: | bird |
---|---|---|---|
Priority: | normal | Milestone: | libc-0.6.4 |
Component: | libc | Version: | 0.6.2 |
Severity: | normal | Keywords: | MIN MAX sys/param.h |
Cc: |
Description
Hi/2.
Why should we define MIN/MAX macros this way in sys/param.h ?
g++ does not understand them.
Just define them normally.
KO Myung-Hun
Attachments (2)
Change History (6)
by , 16 years ago
Attachment: | param.diff added |
---|
comment:1 by , 14 years ago
Keywords: | MIN MAX sys/param.h added |
---|---|
Milestone: | → libc-0.6.4 |
Version: | → 0.6.2 |
The sys/param.h header is using the min and max operators of gcc/g++ to avoid evaluating the winning expressions twice: http://gcc.gnu.org/onlinedocs/gcc-3.3.6/gcc/Min-and-Max.html
This operator was removed with 4.2.0, kLIBC v0.6 ships with 3.3.x so I guess you're using Paul's newer compiler builds then. Will make it work optimally for 3.x as well as 4.x.
comment:2 by , 14 years ago
Ah, Ok.
And I've found the cause.
The closing bracket ')' is missing at the end of the define statement.
Why didn't I find this before ?
by , 14 years ago
Attachment: | param.2.diff added |
---|
Adding a missing bracket ')' at the end of #define statement
comment:3 by , 14 years ago
comment:4 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Patches for sys/param.h