dbTalk Databases Forums  

[BUGS] BUG #1008: fe-misc.c has an ifdef for HAVE_POLL, should be HAVE_POLL_H

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #1008: fe-misc.c has an ifdef for HAVE_POLL, should be HAVE_POLL_H in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
PostgreSQL Bugs List
 
Posts: n/a

Default [BUGS] BUG #1008: fe-misc.c has an ifdef for HAVE_POLL, should be HAVE_POLL_H - 12-15-2003 , 12:54 PM







The following bug has been logged online:

Bug reference: 1008
Logged by: Peter Herndon
Email address: tpherndon (AT) mindspring (DOT) com
PostgreSQL version: 7.4
Operating system: Mac OS X 10.3.1
Description: fe-misc.c has an ifdef for HAVE_POLL, should be HAVE_POLL_H
Details:

With stock 7.4, configure options --prefix=/usr/local --with-rendezvous --with-openssl --with-includes=/sw/include --with-libraries=/sw/lib, make failes on src/interfaces/libpq/fe-misc.c, complaining of undefined functions and constants in and around line 1011, pqSocketPoll function. I poked around my config.log and config.status, and my OS, and found no trace of poll.h, instead I have select.h. Yet the function was crashing the compile in lines looking for poll.h. I looked at the source a bit more and noticed that the #ifdef was looking for HAVE_POLL, and that everything in configure.*, as well as the top of fe-misc.c, was looking at HAVE_POLL_H. So I changed line 1011 to HAVE_POLL_H and the compile succeeds.

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo (AT) postgresql (DOT) org

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #1008: fe-misc.c has an ifdef for HAVE_POLL, should be HAVE_POLL_H - 12-15-2003 , 02:24 PM






"PostgreSQL Bugs List" <pgsql-bugs (AT) postgresql (DOT) org> writes:
Quote:
Description: fe-misc.c has an ifdef for HAVE_POLL, should be HAVE_POLL_H
That's entirely wrong. The configure code sets up two configuration
symbols: HAVE_POLL_H indicates whether the header <poll.h> exists,
while HAVE_POLL indicates whether the library function poll() is
available. The code in fe-misc.c is correct (in each place it uses
these symbols). If HAVE_POLL isn't getting set by configure, then
that's a bug and you should look into the reason why.

FWIW, this code does compile on OS X 10.2.* and 10.3, so if it fails in
10.3.1 then it's because of something Apple changed recently.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo (AT) postgresql (DOT) org


Reply With Quote
  #3  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #1008: fe-misc.c has an ifdef for HAVE_POLL, should be HAVE_POLL_H - 12-15-2003 , 06:13 PM



"Peter Herndon" <tpherndon (AT) mindspring (DOT) com> writes:
Quote:
[ <poll.h> is not present in an OS X 10.3 installation ]

*sheepishly* It looks like it would be the option of, well, installing
DevTools for 10.3 or not... From the looks of it, I never installed
the 10.3 DevTools on the laptop. The 10.2 tools were installed, but
nothing more than that.
Ah. I had eliminated that idea on the thought "he wouldn't have a
compiler if he'd not installed DevTools". Didn't think about an upgrade
from 10.2 DevTools. But that does make sense, since libpoll.dylib will
be part of the base 10.3 OS while poll.h would come in DevTools.

Quote:
Thanks for putting up with stupidity. On the bright side, we uncovered
a corner case.
Right, now we know what the symptom looks like in PG. Thanks for taking
the time to track it down.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.