Обсуждение: Header File cleanup.
Enlighten me: Why use #include "header.h" over #include <header.h> for exported interface header files? I've read the man and info page, and understand the differences from a C preprocessor standpoint, so, suggestions to read those sources will be piped to /dev/null -- I'm looking for why _we_ do it one way over the other. The reason I am asking is to see if anyone using the RPM's have had problems #include'ing our headers.... but, as well, to see just what the advantages of "" over <> are for our exported headers. -- Lamar Owen WGCR Internet Radio 1 Peter 4:11
I'll give you a different source to read ... the archives :) This one has
been bounced back and forth a few times already, with *at least* twice
that I can think of where to even shifted from one to the other and back
again *roll eyes*
On Mon, 29 May 2000, Lamar Owen wrote:
> Enlighten me:
>
> Why use #include "header.h" over #include <header.h> for exported interface
> header files? I've read the man and info page, and understand the differences
> from a C preprocessor standpoint, so, suggestions to read those sources will be
> piped to /dev/null -- I'm looking for why _we_ do it one way over the other.
>
> The reason I am asking is to see if anyone using the RPM's have had problems
> #include'ing our headers.... but, as well, to see just what the advantages of
> "" over <> are for our exported headers.
>
> --
> Lamar Owen
> WGCR Internet Radio
> 1 Peter 4:11
>
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
On Mon, 29 May 2000, The Hermit Hacker wrote: > I'll give you a different source to read ... the archives :) This one has > been bounced back and forth a few times already, with *at least* twice Well, I had read in the archives some already, but, after getting your message, I looked again. And found src/tools/pginclude/pgfixinclude and friends. HOWEVER, for exported headers that are installed, this is suboptimal (not to arbitrarily reopen a can of worms). There is a bug listed on RedHat's bugzilla about this very issue. I'll check a little more, and I may have to undo pgfixincludes handiwork for the exported headers packaged in the rpm -devel subpackage. -- Lamar Owen WGCR Internet Radio 1 Peter 4:11
Lamar Owen <lamar.owen@wgcr.org> writes:
> Enlighten me:
> Why use #include "header.h" over #include <header.h> for exported interface
> header files?
As Marc mentioned, we've gone round on that before. I think the bias
for using "" is largely because it's convenient (or even necessary,
in some scenarios) for building Postgres itself. I am not aware of
any compelling arguments why <> would be better from the perspective
of a client app trying to use already-installed Postgres header files
--- if you know some reasons, let's hear 'em!
I'm prepared to believe that the client's-eye view might favor something
different from the developer's-eye view. I think you were suggesting
that we might want to replace "" by <> in installed copies of the
headers. I'd support that if it were shown necessary, but I'd want to
be shown first...
regards, tom lane