develooper Front page | perl.perl5.porters | Postings from December 2001

Re: it won't compile on win32

Thread Previous | Thread Next
From:
Nick Ing-Simmons
Date:
December 29, 2001 11:52
Subject:
Re: it won't compile on win32
Message ID:
20011229195151.15967.9@bactrian.ni-s.u-net.com
Nicholas Clark <nick@unfortu.net> writes:
>On Sat, Dec 29, 2001 at 03:23:31PM +0000, Nick Ing-Simmons wrote:
>> SOCKET is a Win32-ism 
>> In its <winsock.h> it is typedef-ed to u_int.
>> It is basically a numeric file descriptor but in a space disjoint 
>> (maybe) from normal open() type fds.
>> 
>> Suggest you try:
>> 
>> #ifndef WIN32
>> #define SOCKET int
>> #endif  
>
>Yes, that works nicely. The link fails with:
>
>miniperlmain.o: In function `main':
>miniperlmain.o(.text+0x44): undefined reference to `perl_alloc'
>libperl.a(sv.o): In function `perl_clone':
>sv.o(.text+0xfcd4): undefined reference to `perl_clone_host'
>libperl.a(sharedsv.o): In function `Perl_sharedsv_init':
>sharedsv.o(.text+0x1c): undefined reference to `perl_alloc'
>collect2: ld returned 1 exit status
>
>and I can't find anything (even in the win32 directory) that redefines
>perl_alloc in terms of perl_alloc_using to make this work:

perl_alloc() and perl_clone_host() et. al. live in 

win32/perllib.c 

Which (despite its extension) is a C++ file which uses win32/perlhost.h 
etc. to define classes that allow re-direction of things.

>
>void
>Perl_sharedsv_init(pTHX)
>{
>  PerlInterpreter* old_context = PERL_GET_CONTEXT;
>  PL_sharedsv_space = perl_alloc();
>  perl_construct(PL_sharedsv_space);
>  PERL_SET_CONTEXT(old_context);
>  MUTEX_INIT(&PL_sharedsv_space_mutex);
>}
>
>Presumably this bit of NetWare/nw5.c needs to be promoted to the core in some
>way that is friends with WIN32?
>
>#ifdef USE_ITHREADS
>PerlInterpreter *
>perl_clone_host(PerlInterpreter* proto_perl, UV flags)
>{
>	// Perl Clone is not implemented on NetWare.
>    return NULL;
>}
>#endif
>
>Nicholas Clark
-- 
Nick Ing-Simmons
http://www.ni-s.u-net.com/


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About