Re: Re: Cygwin PostgreSQL CVS Patch Question
От | Jason Tishler |
---|---|
Тема | Re: Re: Cygwin PostgreSQL CVS Patch Question |
Дата | |
Msg-id | 20010109181614.C1364@dothill.com обсуждение исходный текст |
Ответ на | Re: Cygwin PostgreSQL CVS Patch Question (Jason Tishler <Jason.Tishler@dothill.com>) |
Ответы |
Re: Re: Cygwin PostgreSQL CVS Patch Question
|
Список | pgsql-ports |
Peter, On Tue, Jan 09, 2001 at 05:55:39PM -0500, Jason Tishler wrote: > On Tue, Jan 09, 2001 at 04:34:57PM -0500, Tom Lane wrote: > > Jason Tishler <Jason.Tishler@dothill.com> writes: > > > Why did you remove the following from src/include/port/win.h? > > > #if (CYGWIN_VERSION_API_MAJOR >= 0) && (CYGWIN_VERSION_API_MINOR >= 8) > > > #define sys_nerr _sys_nerr > > > #endif > > > This definitely breaks Cygwin. > > > > Er, why should it? With the code as it stands, configure should decide > > that Cygwin doesn't HAVE_SYS_NERR, and so nothing will reference > > sys_nerr. > > Unfortunately, the above is not true: > > $ configure > ... > checking for sys_nerr... yes > ... I have more details as to why the above is occurring. Consider the following program, j.c, which is derived from the sys_nerr test program in configure: extern int sys_nerr; int main() { int x = sys_nerr; ; return 0; } Now compile it with the same (relevant) options used by configure: $ gcc -O2 -o j j.c Now compile it without the -O2 option: $ gcc -o j j.c /tmp/ccf49pHw.o(.text+0xc):j.c: undefined reference to `sys_nerr' collect2: ld returned 1 exit status The problem is gcc -O2 is being too smart, optimizing away the reference to sys_nerr. So when configure compiles it's sys_nerr test program it compiles without errors and returns 0 which fools configure into thinking that Cygwin has sys_nerr. Any ideas on what is the best way to solve this problem? Thanks, Jason -- Jason Tishler Director, Software Engineering Phone: +1 (732) 264-8770 x235 Dot Hill Systems Corp. Fax: +1 (732) 264-8798 82 Bethany Road, Suite 7 Email: Jason.Tishler@dothill.com Hazlet, NJ 07730 USA WWW: http://www.dothill.com
В списке pgsql-ports по дате отправления: