src/tds/types.h
"Craig A. Berry" <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
I'm running into a problem building src/tds/unittests/convert.c on VMS. It includes sys/time.h, which on this system includes in.h, which in turn includes types.h, but obviously it wants the system-level types.h, not the local one in src/tds.[1] However, because convert.c needs other include files from src/tds, the compiler searches that directory first, gets the wrong header, and fails because src/tds/types.h needs all sorts of definitions which the compiler hasn't seen yet. It looks like src/tds/types.h is just an appendage to data.c and isn't installed, so could we please name it something that doesn't conflict with a system-level header? Maybe tds_types.h, or data_types.h, or even just data.h? Naming a header the same as one supplied by the system seems a little dubious and some folks even consider it a security risk: <https://www.securecoding.cert.org/confluence/display/seccode/PRE04-C.+Do+not+reuse+a+standard+header+file+name> [1] With the HP C compiler, the "sys/" part of <sys/types.h> is optional and the system-supplied headers themselves don't always use it. Even if that's a bug, it's one I can't fix. ________________________________________ Craig A. Berry mailto:[email protected] "... getting out of a sonnet is much more difficult than getting in." Brad Leithauser