Subject: Re: ?

From: "NP (in)complete problem." <[email-masked]>
Date: Sat, 14 May 94 00:13:35 EDT

Hi:

Everytime I compile some code with "libpq.h" I get the following
warning mesg. What needs to be done to the header file to get rid of this ?

( gcc version 2.5.8, postgres 4.1, lex 2.4.6, and bison 1.22 )

gcc -g -DYYDEBUG=1 -I/usr/postgres/include  -target sun4 -c  addattr.c
In file included from addattr.c:2:
/usr/postgres/include/libpq.h:215: warning: `struct sockaddr_in' declared inside parameter list
/usr/postgres/include/libpq.h:215: warning: its scope is only this definition or declaration,
/usr/postgres/include/libpq.h:215: warning: which is probably not what you want.
/usr/postgres/include/libpq.h:216: warning: `struct sockaddr_in' declared inside parameter list

Thanks,

-- Niranjan

===============================================================================
    To add/remove yourself from the POSTGRES mailing list: send mail with 
    the subject line ADD or DEL to "[email-masked]"

    If this fails, send mail to "[email-masked]" and
    a human will deal with it.  DO NOT post to the "postgres" mailing list.
===============================================================================

---

From: [email-masked] (Paul M. Aoki)
Date: Fri, 13 May 94 21:57:01 -0700

> ( gcc version 2.5.8, postgres 4.1, lex 2.4.6, and bison 1.22 )

i don't know if this is documented in the release notes, but
it's a pretty bad idea to try to use the prototypes in the 4.x
(x<2) header files, since a lot of them are wrong. :-P

if you insist on doing so (by using gcc without -traditional)
and on not upgrading to 4.2, you can silence those particular
messages by including <netinet/in.h>..
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  [email-masked]
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki