Обсуждение: oid2name silly patch
> a wild patch for something i need to use.
>
> ciao,
> andrea
oid2name is now in /contrib/Makefile. As for getopt.h, most platforms
don't have it. BSD/OS has:
#include <stdio.h>
#include <unistd.h>
I have added #include <unistd.h>. Let me know if that helps.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
OK, add #include <stdio.h> to the file. That should fix it. > On Mon, Feb 12, 2001 at 08:55:31AM -0500, Bruce Momjian wrote: > > I have added #include <unistd.h>. Let me know if that helps. > > it works, thanks. > there are still two warnings, but they don't hurt the program. > > oid2name.c: In function `sql_exec_dumpdb': > oid2name.c:318: warning: passing arg 3 of `sql_exec' makes integer from pointer without a cast > oid2name.c: In function `sql_exec_dumptable': > oid2name.c:335: warning: passing arg 3 of `sql_exec' makes integer from pointer without a cast > > ciao, > andrea > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> OK, add #include <stdio.h> to the file. That should fix it.
Seems unlikely, since libpq-fe.h already includes <stdio.h>.
The real problem here is that the code is wrong: it's passing NULL
to an int parameter.
regards, tom lane
On Mon, Feb 12, 2001 at 08:55:31AM -0500, Bruce Momjian wrote: > I have added #include <unistd.h>. Let me know if that helps. it works, thanks. there are still two warnings, but they don't hurt the program. oid2name.c: In function `sql_exec_dumpdb': oid2name.c:318: warning: passing arg 3 of `sql_exec' makes integer from pointer without a cast oid2name.c: In function `sql_exec_dumptable': oid2name.c:335: warning: passing arg 3 of `sql_exec' makes integer from pointer without a cast ciao, andrea
Thanks. Fix applied. My gcc doesn't complain, even with -Wall, so I assumed it was a platform-specific issue. > Bruce Momjian <pgman@candle.pha.pa.us> writes: > > OK, add #include <stdio.h> to the file. That should fix it. > > Seems unlikely, since libpq-fe.h already includes <stdio.h>. > > The real problem here is that the code is wrong: it's passing NULL > to an int parameter. > > regards, tom lane > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Thanks. Fix applied. My gcc doesn't complain, even with -Wall, so I
> assumed it was a platform-specific issue.
Well, it is: it'd depend on exactly how NULL is defined by your system's
headers ...
regards, tom lane