freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Craig A. Berry" <craigberry AT mac.com>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: [freetds] src/tds/types.h
- Date: Fri, 22 Apr 2011 08:36:54 -0500
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:craigberry AT mac.com
"... getting out of a sonnet is much more
difficult than getting in."
Brad Leithauser
-
[freetds] src/tds/types.h,
Craig A. Berry, 04/22/2011
- Re: [freetds] src/tds/types.h, Frediano Ziglio, 04/22/2011
Archive powered by MHonArc 2.6.24.