From: jeffdbREMOVETHIS AT goodnet DOT com (Mikey) Subject: Re: tiny patch for execvp [Re: Problems with winsup-981223] 29 Jan 1999 23:26:19 -0800 Message-ID: <36b8a56c.78940298.cygnus.cygwin32.developers@mail.goodnet.com> References: <19981227212632 DOT A24196 AT cygnus DOT com> Reply-To: jeffdbREMOVETHIS AT goodnet DOT com To: cygwin32-developers AT cygnus DOT com The DATA keyword means that there is no actual .text section symbol _sys_errlist generated only __imp___sys_errlist and ___imp__sys_errlist so linking directly with libcygwin.a without #include as the test in libiberty does means that ld.exe doesn't find it. I noticed this when running configure in libiberty for the 990115 snap with the .dll and .lib installed in fact I installed the whole cygwin-inst-19990115.tar.bz2 if you do an nm on libcygwin.a you will see what I mean. I ran into this issue before trying to run mingw32 configure using the real msvcrt.lib The proper fix is to use errno.h with configure, as bash does otherwise poorly written software could end up linking with _sys_errlist and crashing with no warning. That's why MS switched from using CONST to using DATA. On Sat, 30 Jan 1999 01:04:35 -0500, you wrote: >On Fri, Jan 29, 1999 at 03:09:55AM +0000, Mikey wrote: >>Something I didn't take into account with this is that the configure >>mechanism bypasses the headers in most cases, and checks directly by >>using the linker. >> >>looks like using the DATA keyword in cygwin.din wasn't such a good idea >>:-( >> >>_ctype_ DATA >>_sys_errlist DATA >>_sys_nerr DATA >> >>configure can't find sys_errlist or sys_nerr, in .../src/libiberty. > >We run configure/builds almost every night and haven't run across a >problem with this. Have you updated your libcygwin.a? > >>Either the test in .../src/libiberty/configure needs to be changed to >>the same as the one in .../src/bash/configure (which would also fix >>mingw32) or the DATA keyword needs to be removed from these 2 in >>cygwin.din. > >Can you explain why you think that removing the DATA keyword would >solve the problem? > >-chris