Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#7124 closed bug (invalid)

sys/resource.h is giving warning @ line 17 for empty declaration

Reported by: scottmc Owned by: nobody
Priority: normal Milestone: R1
Component: System/POSIX Version: R1/alpha2
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

When building xinetd on Haiku I am getting lots of warnings for sys/resource.h line 17 empty declaration. This was with gcc2, may or may not show up with gcc4, as I haven't checked that yet.

Change History (3)

comment:1 by bonefish, 9 years ago

The line has changed since alpha 2 (hrev34214), but it was a typedef back then still is now. I'm not even sure what "empty declaration" is supposed to mean. The exact error message as well as a pre-processed version of the compiled file might help.

comment:2 by scottmc, 9 years ago

Resolution: invalid
Status: newclosed

I tracked this down in xinetd, it seems that the generated config.h had the offending line in it:

#define rlim_t long long

I've updated the .bep file to dnl the line in configure.in that was adding this in. I'm assuming this to be an invalid ticket? Or is there a better way to write the typedef so that it works even if rlim_t gets redef'd as long long?

in reply to:  2 comment:3 by bonefish, 9 years ago

Replying to scottmc:

I've updated the .bep file to dnl the line in configure.in that was adding this in. I'm assuming this to be an invalid ticket? Or is there a better way to write the typedef so that it works even if rlim_t gets redef'd as long long?

The header could theoretically #ifdef everything it defines, but that's just silly. The header is supposed to typedef that type and whoever tries to redefine it does something unportable.

Note: See TracTickets for help on using tickets.