Re: atoi() missing on Win98, perl extension breaks

2005-01-11 Thread Corinna Vinschen
On Jan 11 08:59, Gerrit P. Haase wrote:
 Jacek Piskozub wrote:
 Gerritt wrote,
 $self-{LIBS} = [q{ -L/lib/w32api -lnetapi32 -lwininet -lversion -lmpr 
 -lodbc32 -lodbccp32 -lwinmm -lstdc++ -lole32 -loleaut32 -luuid 
 -lcomctl32 -lgdi32 -lcomdlg32 -lntdll }];
 
 Now the question is which of these libs can be removed and which needs
 to stay?
 
 I believe the real underlying cause is that /lib/w32api/libntdll.a 
 contains a atoi function header (I see that in 
 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/winsup/w32api/lib/ntdll.def?cvsroot=src
  
 together with a zillion other WinNT/2K/XP functions). This is wrong 
 because Win9x have only a very limited set of functions in ntdll.dll.
 
 Yes, I thought it is a w32api bug at first too.  Who is the maintainer
 of w32api?

The MingW team.  However, the symbols in ntdll.def are there already for
a long time and they are apparently ok even though it rolls up my toe nails.
Also, the fact that 9x has only a limited set of functions in this DLL
doesn't mean that the NT symbols shouldn't be present.

Explicit linking against ntdll is the problem here.  I guess the right
thing would be to link against -lcygwin first.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: atoi() missing on Win98, perl extension breaks

2005-01-11 Thread Christopher Faylor
On Tue, Jan 11, 2005 at 12:03:19PM +0100, Corinna Vinschen wrote:
On Jan 11 08:59, Gerrit P. Haase wrote:
Jacek Piskozub wrote:
Gerritt wrote,
$self-{LIBS} = [q{ -L/lib/w32api -lnetapi32 -lwininet -lversion -lmpr
-lodbc32 -lodbccp32 -lwinmm -lstdc++ -lole32 -loleaut32 -luuid
-lcomctl32 -lgdi32 -lcomdlg32 -lntdll }];

Now the question is which of these libs can be removed and which needs
to stay?

I believe the real underlying cause is that /lib/w32api/libntdll.a
contains a atoi function header (I see that in
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/winsup/w32api/lib/ntdll.def?cvsroot=src
together with a zillion other WinNT/2K/XP functions).  This is wrong
because Win9x have only a very limited set of functions in ntdll.dll.

Yes, I thought it is a w32api bug at first too.  Who is the maintainer
of w32api?

The MingW team.  However, the symbols in ntdll.def are there already
for a long time and they are apparently ok even though it rolls up my
toe nails.  Also, the fact that 9x has only a limited set of functions
in this DLL doesn't mean that the NT symbols shouldn't be present.

Explicit linking against ntdll is the problem here.  I guess the right
thing would be to link against -lcygwin first.

Or not explicitly linking against ntdll.  It will obviously be called in
if it is needed.

cgf

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: atoi() missing on Win98, perl extension breaks (was: Re: bug in w32api?)

2005-01-10 Thread Christopher Faylor
On Mon, Jan 10, 2005 at 10:02:07PM +0100, Gerrit P. Haase wrote:
Jacek Piskozub wrote:

When the atom clock displayed 10/01/2005 21:27,  Gerrit P. Haase emitted 
the following byte stream:

Jacek Piskozub wrote:

After updating to perl 5.8.6-1 I got an missing ntdll.dll export 
error. Because I use Windows Me, I do not obviously have any 
ntdll.dll. It seems the new perl was compiled for WindowsNT/2k/Xp only.



A bug in w32api?

No.  It is the statically linked in Win32CORE extension.

The offending export is directly from perl.exe, it seems.

The error pop-up says the same story:

The PERL.EXE file is linked to missing export NTDLL.DLL:atoi

All I needed to trigger it was perl -V.

Hmmm, atoi() is not available on Win98/ME?  Strange.

Why would perl be finding atoi in ntdll.dll?  It should be coming from
the cygwin DLL shouldn't it?

cgf

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: atoi() missing on Win98, perl extension breaks (was: Re: bug in w32api?)

2005-01-10 Thread Igor Pechtchanski
On Mon, 10 Jan 2005, Gerrit P. Haase wrote:

 Jacek Piskozub wrote:

  When the atom clock displayed 10/01/2005 21:27,  Gerrit P. Haase emitted the
  following byte stream:

Heh, I like this one... :-)

 [snip]
  The offending export is directly from perl.exe, it seems.
 
  The error pop-up says the same story:
 
  The PERL.EXE file is linked to missing export NTDLL.DLL:atoi
 
  All I needed to trigger it was perl -V.

 Hmmm, atoi() is not available on Win98/ME?  Strange.

Huh?  Isn't atoi part of newlib (libc.a)?  Why would it even go to
ntdll.dll?  Something's fishy here.
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: atoi() missing on Win98, perl extension breaks

2005-01-10 Thread Gerrit P. Haase
Christopher Faylor wrote:
All I needed to trigger it was perl -V.
Hmmm, atoi() is not available on Win98/ME?  Strange.

Why would perl be finding atoi in ntdll.dll?  It should be coming from
the cygwin DLL shouldn't it?
Yes, as it used to be, it is used all over the place in the perl
sources.  I'm a little clueless now.
Gerrit
--
=^..^=
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: atoi() missing on Win98, perl extension breaks

2005-01-10 Thread Jacek Piskozub
Gerritt,
Hmmm, atoi() is not available on Win98/ME?  Strange.
I believe it is placed in MSVCRT.DLL. But we should use the cygwin 
version, anyway.

Jacek
**
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: atoi() missing on Win98, perl extension breaks

2005-01-10 Thread Jacek Piskozub
Gerritt,
Hmmm, atoi() is not available on Win98/ME?  Strange.
I compiled a one-liner with atoi() function using Visual Studio 6.
The resulting atoi.exe links only to kernel32.dll on WindowsME.
E:\Downloadcygcheck c:\atoi.exe
e:/atoi.exe
  C:\WINDOWS\SYSTEM\KERNEL32.dll
Jacek


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


RE: atoi() missing on Win98, perl extension breaks

2005-01-10 Thread Keith Moore
Gerrit P. Haase wrote:
 Christopher Faylor wrote:
 
 All I needed to trigger it was perl -V.
 
 Hmmm, atoi() is not available on Win98/ME?  Strange.
 
 
 Why would perl be finding atoi in ntdll.dll?  It should be coming
 from the cygwin DLL shouldn't it?
 
 Yes, as it used to be, it is used all over the place in the perl
 sources.  I'm a little clueless now. 

Is it possible the order of link libraries got rearranged in the new
version? That could do it.

KM

P.S. I've been lurking on this list for a long time. Greetings, all,
and thanks for cygwin!



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: atoi() missing on Win98, perl extension breaks

2005-01-10 Thread Yitzchak Scott-Thoennes
On Mon, Jan 10, 2005 at 10:22:11PM +0100, Gerrit P. Haase wrote:
 Christopher Faylor wrote:
 
 All I needed to trigger it was perl -V.
 
 Hmmm, atoi() is not available on Win98/ME?  Strange.
 
 
 Why would perl be finding atoi in ntdll.dll?  It should be coming from
 the cygwin DLL shouldn't it?
 
 Yes, as it used to be, it is used all over the place in the perl
 sources.  I'm a little clueless now.

Did you verify that it was Win32CORE at fault by trying a perl built
without it?

Perl itself doesn't use atoi, nor does Win32CORE.xs.  I'm guessing
Win32CORE is calling a win32 routine that isn't fully supported
on win9x.  One of:

WideCharToMultiByte
CloseHandle
CopyFileA
CreateProcessA
FindClose
FindFirstFileA
FormatMessageA
FreeLibrary
GetComputerNameA
GetCurrentDirectoryA
GetDriveTypeA
GetFullPathNameA
GetLastError
GetProcAddress
GetShortPathNameA
GetTickCount
GetUserNameA
GetVersionExA
GetVolumeInformationA
LoadLibraryA
LookupAccountNameA
SetLastError
Sleep

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: atoi() missing on Win98, perl extension breaks

2005-01-10 Thread Gerrit P. Haase
Yitzchak Scott-Thoennes wrote:
On Mon, Jan 10, 2005 at 10:22:11PM +0100, Gerrit P. Haase wrote:
Christopher Faylor wrote:

All I needed to trigger it was perl -V.
Hmmm, atoi() is not available on Win98/ME?  Strange.

Why would perl be finding atoi in ntdll.dll?  It should be coming from
the cygwin DLL shouldn't it?
Yes, as it used to be, it is used all over the place in the perl
sources.  I'm a little clueless now.

Did you verify that it was Win32CORE at fault by trying a perl built
without it?
$ cat ext.libs
-L/lib/w32api -lnetapi32 -lwininet -lversion -lmpr -lodbc32 -lodbccp32 
-lwinmm -lstdc++ -lole32 -loleaut32 -luuid -lcomctl32 -lgdi32 -lcomdlg32 
-lntdll

There it is:
$ cat ext/Win32CORE/hints/cygwin.pl
[...]
$self-{LIBS} = [q{ -L/lib/w32api -lnetapi32 -lwininet -lversion -lmpr 
-lodbc32 -lodbccp32 -lwinmm -lstdc++ -lole32 -loleaut32 -luuid 
-lcomctl32 -lgdi32 -lcomdlg32 -lntdll }];
[...]

Perl itself doesn't use atoi, nor does Win32CORE.xs.  I'm guessing
Win32CORE is calling a win32 routine that isn't fully supported
on win9x.  One of:
$ grep -r atoi *
[72 lines output]
Now the question is which of these libs can be removed and which needs
to stay?  I'll try to remove all of them at first since it seems that 
many of them are only used for specific extension modules.

Gerrit
--
=^..^=
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: atoi() missing on Win98, perl extension breaks

2005-01-10 Thread Yitzchak Scott-Thoennes
On Tue, Jan 11, 2005 at 01:23:06AM +0100, Gerrit P. Haase wrote:
 Yitzchak Scott-Thoennes wrote:
 
 On Mon, Jan 10, 2005 at 10:22:11PM +0100, Gerrit P. Haase wrote:
 
 Christopher Faylor wrote:
 
 
 All I needed to trigger it was perl -V.
 
 Hmmm, atoi() is not available on Win98/ME?  Strange.
 
 
 Why would perl be finding atoi in ntdll.dll?  It should be coming from
 the cygwin DLL shouldn't it?
 
 Yes, as it used to be, it is used all over the place in the perl
 sources.  I'm a little clueless now.
 
 
 Did you verify that it was Win32CORE at fault by trying a perl built
 without it?
 
 $ cat ext.libs
 -L/lib/w32api -lnetapi32 -lwininet -lversion -lmpr -lodbc32 -lodbccp32 
 -lwinmm -lstdc++ -lole32 -loleaut32 -luuid -lcomctl32 -lgdi32 -lcomdlg32 
 -lntdll
 
 There it is:
 $ cat ext/Win32CORE/hints/cygwin.pl
 [...]
 $self-{LIBS} = [q{ -L/lib/w32api -lnetapi32 -lwininet -lversion -lmpr 
 -lodbc32 -lodbccp32 -lwinmm -lstdc++ -lole32 -loleaut32 -luuid 
 -lcomctl32 -lgdi32 -lcomdlg32 -lntdll }];
 [...]
 
 Perl itself doesn't use atoi, nor does Win32CORE.xs.  I'm guessing
 Win32CORE is calling a win32 routine that isn't fully supported
 on win9x.  One of:
 
 $ grep -r atoi *
 [72 lines output]

Sorry, I was thinking of atof.  Anyway, Win32CORE.c doesn't use it.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: atoi() missing on Win98, perl extension breaks

2005-01-10 Thread Jacek Piskozub
Gerritt wrote,
There it is:
$ cat ext/Win32CORE/hints/cygwin.pl
[...]
$self-{LIBS} = [q{ -L/lib/w32api -lnetapi32 -lwininet -lversion -lmpr -lodbc32 
-lodbccp32 -lwinmm -lstdc++ -lole32 -loleaut32 -luuid -lcomctl32 -lgdi32 
-lcomdlg32 -lntdll }];
[...]

Now the question is which of these libs can be removed and which needs
to stay?

I believe the real underlying cause is that /lib/w32api/libntdll.a 
contains a atoi function header (I see that in 
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/winsup/w32api/lib/ntdll.def?cvsroot=src 
together with a zillion other WinNT/2K/XP functions). This is wrong 
because Win9x have only a very limited set of functions in ntdll.dll.

Or, if you prefer, indiscriminate linking to ntdll.dll in all Windows 
versions is the actual culprit.

Jacek



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: atoi() missing on Win98, perl extension breaks

2005-01-10 Thread Gerrit P. Haase
Jacek Piskozub wrote:
Gerritt wrote,
There it is:
$ cat ext/Win32CORE/hints/cygwin.pl
[...]
$self-{LIBS} = [q{ -L/lib/w32api -lnetapi32 -lwininet -lversion -lmpr 
-lodbc32 -lodbccp32 -lwinmm -lstdc++ -lole32 -loleaut32 -luuid 
-lcomctl32 -lgdi32 -lcomdlg32 -lntdll }];
[...]

Now the question is which of these libs can be removed and which needs
to stay?


I believe the real underlying cause is that /lib/w32api/libntdll.a 
contains a atoi function header (I see that in 
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/winsup/w32api/lib/ntdll.def?cvsroot=src 
together with a zillion other WinNT/2K/XP functions). This is wrong 
because Win9x have only a very limited set of functions in ntdll.dll.
Yes, I thought it is a w32api bug at first too.  Who is the maintainer
of w32api?

Or, if you prefer, indiscriminate linking to ntdll.dll in all Windows 
versions is the actual culprit.

Gerrit
--
=^..^=
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/