summaryrefslogtreecommitdiff
path: root/win32/perllib.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused variableSteve Hay2014-04-141-1/+0
|
* Fix DllMain definition to fix building with gcc-4.8.1 from www.mingw.orgSteve Hay2014-04-141-1/+1
| | | | This partly fixes perl #121643.
* Remove leftover Windows 95 / Windows NT4 support codeSteve Hay2014-02-261-14/+3
| | | | | | | We only support building or running on Windows 2000 or higher, as of the Windows 95 Chainsaw Massacre commit (8cbe99e5b6). These three chunks of code escaped the massacre, but the chainsaw has finally caught up with them now.
* Include the Win32 extension in the ALL_STATIC build on Win32Steve Hay2013-06-071-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many of Win32's Perl level functions are pre-defined (even without a "use Win32" statement), while the implementation is in a dynamically linked module. This is done via the statically linked Win32CORE wrapper that will load Win32 on demand. The initialization of Win32CORE (init_Win32CORE()) is called -- dynamically, via GetProcAddress(), since miniperl.exe doesn't include it -- from Perl_init_os_extras() and normally relies on the DLL's HANDLE having been set in the DLL_PROCESS_ATTACH case of DllMain() in perllib.c. We must use a different HANDLE when the functions are located in perl-static.exe since DllMain() is not called in that case, and, in fact, it is sensible to consider other parts of DllMain() which Perl_init_os_extras() might also need to do... The #ifdef DEFAULT_BINMODE section can be scrapped completely since the symbol is not defined, never mentioned anywhere else and not documented. The DisableThreadLibraryCalls() call is not applicable for code that doesn't reside in a DLL. That just leaves set_w32_module_name(), but that is not required either, and may actually be redundant in the DllMain() case too (maybe I will remove it later). The last-but-one thing to do is to arrange for init_Win32CORE to be exported from perl-static.exe (as it already is from perl519.dll, courtesy of makedef.pl) otherwise GetProcAddress() won't find it. I see no harm in always specifying __declspec(dllexport) in Win32CORE.c (except in one existing Cygwin case which doesn't want it, which I'm not touching to minimize regression risk). I thought that the .def file entry written by makedef.pl for perl519.dll would then become redundant, and whilst the VC++ build worked fine without it, the MinGW build didn't: init_Win32CORE no longer got exported from perl519.dll, thus breaking the normal build, so I've therefore left makedef.pl alone. The very last thing to do in some future change is to improve the ALL_STATIC build so that Win32 functions like CopyFile() do not go through Win32CORE's w32_CORE_all forwarding function as they currently do: it isn't necessary when Win32 is statically linked as well! I will revisit this part very soon... Thanks to Jan Dubois and all the others in the following thread for invaluable assistance in this and other recent changes in this area: http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2013-06/msg00016.html
* consting in perl.c:S_Internals_V and Win32 DynaLoaderDaniel Dragan2012-10-311-1/+1
| | | | | | | These assorted static allocated variables were in RW memory in the perl image. Move them to RO memory so they are sharable between different Perl processes by the OS. The lack of consting in Win32 Dynaloader traces to commit 0a753a76406 . S_Internals_V traces to commit 4a5df386486 .
* The Borland Chainsaw MassacreSteve Hay2011-09-101-1/+1
| | | | | Remove support for the Borland C++ compiler on Win32, as agreed here: http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2011-09/msg00034.html
* Simplify embedvar.h, removing a level of macro indirection for PL_* variables.Nicholas Clark2011-08-111-4/+4
| | | | | | | For the default (non-multiplicity) configuration, PERLVAR*() macros now directly expand their arguments to tokens such as C<PL_defgv>, instead of expanding to C<PL_Idefgv>. This removes over 350 lines from F<embedvar.h>, which defined macros to map from C<PL_Idefgv> to C<PL_defgv> and so forth.
* PATCH: Large omnibus patch to clean up the JRRT quotesTom Christiansen2008-11-021-1/+5
| | | | | | Message-ID: <25940.1225611819@chthon> Date: Sun, 02 Nov 2008 01:43:39 -0600 p4raw-id: //depot/perl@34698
* Restore Windows NT supportJan Dubois2007-05-131-1/+1
| | | | | | From: "Jan Dubois" <jand@activestate.com> Message-ID: <02d101c79434$743be100$5cb3a300$@com> p4raw-id: //depot/perl@31211
* ANSIfy the PATH environment variable on WindowsJan Dubois2007-01-051-0/+11
| | | | | Message-ID: <7coqp2pme3r30qaonticuv6c6licieg4cg@4ax.com> p4raw-id: //depot/perl@29690
* [PATCH] Use short pathnames in $^X and @INC if the long form cannot be ↵Jan Dubois2007-01-031-9/+21
| | | | | | | | | | | | | represented in the current codepage Date: Thu, 28 Dec 2006 18:59:40 -0800 Message-ID: <vq09p2p09k6rcu6c9t0mab3vnc335ghg9m@4ax.com> Subject: Re: [PATCH] Use short pathnames in $^X and @INC if the long form cannot be represented in the current codepage From: Jan Dubois <jand@ActiveState.com> Date: Wed, 03 Jan 2007 08:12:35 -0800 Message-ID: <orknp2pj17265modfosjkp2qtt4bdgtgjp@4ax.com> p4raw-id: //depot/perl@29675
* Change #29424 may well be correct in itself, but currently doesn'tSteve Hay2006-12-041-13/+3
| | | | | | | | | | | | | | | work when perl is built with PERL_IMPLICIT_SYS because PERLIO_TERM uses PerlMemShared_free() which, in that case, involves the perlhost that has already been freed itself by perl_free(), which is called before PERL_SYS_TERM(). The order of perl_destruct(), perl_free(), PERL_SYS_TERM() cannot be changed (it is advertised in perlembed for a start), so just revert #29424 and the appropriate parts of #29442 for now. Perhaps PL_perlio_fd_refcnt needs allocating differently, or else the perlhost needs freeing later (after PerlIO)? p4raw-id: //depot/perl@29451
* Re: [PATCH] Re: [PATCH] Re: [PATCH] abstract mempool header testingYves Orton2006-12-031-3/+13
| | | | | Message-ID: <9b18b3110612020548l7c5aefd4m19cb0b5c4395abb4@mail.gmail.com> p4raw-id: //depot/perl@29442
* RE: [PATCH-for-28089] wince yet another stepVadim Konovalov2006-05-041-1/+1
| | | | | | From: "Konovalov, Vadim Vladimirovich (Vadim)** CTR **" <vkonovalov@Lucent.com> Message-ID: <E3FB32585BF1D411B9E900805FF51A0801BCB454@ru0022exch001u.ru.lucent.com> p4raw-id: //depot/perl@28100
* Merge WinCE and Win32 directories -- Initial patchYves Orton2006-04-281-2/+44
| | | | | Message-ID: <9b18b3110604271430k4de84685jec6535ded195ed94@mail.gmail.com> p4raw-id: //depot/perl@28003
* Fix static extensions when building with nmake on Win32Steve Hay2005-07-151-6/+0
| | | | | | | | | | | | | | | They were broken because change 24806 forgot to add -DWITH_STATIC to the recipe for compiling perllib.c which meant that perllibst.h was not included and hence although they built OK, the static extensions could not actually be used! In fact, since perllibst.h is always created (it is more or less empty when static extensions are not being used), there is no need for -DWITH_STATIC at all. So rather than adding it to Makefile, just drop it from makefile.mk and perllib.c. Also add the missing cleanup of perllibst.h to Makefile. p4raw-id: //depot/perl@25150
* enable statically linked extensions for Win32Vadim Konovalov2004-10-121-0/+15
| | | | | Message-ID: <80173417046.20041011225700@vkonovalov.ru> p4raw-id: //depot/perl@23360
* Happy chainsaw stories; The removal of the 5005 threadsH.Merijn Brand2002-10-191-1/+1
| | | | | Still imcomplete. Configure will follow p4raw-id: //depot/perl@18030
* fixes for all the warnings reported by Visual C (most of thisGurusamy Sarathy2002-04-211-1/+0
| | | | | | change is from change#12026) p4raw-link: @12026 on //depot/maint-5.6/perl: ff42b73b40f5a895aef4bed81c794f468e0609bc p4raw-id: //depot/perl@16048
* Win32 fixes:Nick Ing-Simmons2002-01-131-0/+14
| | | | | | - vmem.h hack to handle free-by-wrong-thread after eval "". - Initialize timerid p4raw-id: //depot/perlio@14232
* remove deprecated PERL_OBJECT cruft, it has long since stoppedGurusamy Sarathy2001-08-311-131/+3
| | | | | working in 5.7.x p4raw-id: //depot/perl@11803
* Changes USE_THREADS to USE_5005THREADS in the entire source.Artur Bergman2001-08-271-1/+1
| | | | | | Thanks to H. Merijn Brand for the patch. Some of the comments and or guards might be removable in perl.h now. p4raw-id: //depot/perl@11758
* perl_clone_host() needs PERL_IMPLICIT_SYS.Jarkko Hietaniemi2001-06-261-1/+1
| | | p4raw-id: //depot/perl@10970
* Adds perl_clone_host under IMPLICIT SYSArtur Bergman2001-06-261-0/+23
| | | | | Message-ID: <B75E5BA5.1A7C%artur@contiller.se> p4raw-id: //depot/perl@10954
* Win32 PERL_IMPLICIT_SYS passes all tests with USE_PERLIONick Ing-Simmons2000-12-051-3/+6
| | | | | | | - calloc/free suffer from damage on TerminateThread() - use PerlMemShared (as originally planned) now fixed - avoid doing anything important on DLL "detach". p4raw-id: //depot/perlio@8001
* PERL_IMPLICIT_SYS compiles but does not work.Nick Ing-Simmons2000-12-031-2/+1
| | | p4raw-id: //depot/perlio@7970
* get sources building on windows+MSVC again (untested with otherGurusamy Sarathy2000-11-231-0/+2
| | | | | compilers) p4raw-id: //depot/perl@7827
* Win32 builds and runs (mostly) with USE_PERLIO.Nick Ing-Simmons2000-11-211-0/+1
| | | | | | PERLIO=perlio passes all tests. PERLIO=stdio (sadly the default) hangs in t.pragma/warnings.t #319 p4raw-id: //depot/perlio@7796
* free TLS slot properly on WindowsGurusamy Sarathy2000-08-211-0/+4
| | | p4raw-id: //depot/perl@6748
* winsock cleanup never done on Windows (leads to handle leaks)Gurusamy Sarathy2000-07-051-0/+5
| | | p4raw-id: //depot/perl@6317
* due to an oversight during PERL_OBJECT migration, hosts createdGurusamy Sarathy2000-03-161-11/+13
| | | | | | | | | by pseudo-fork were never being deleted, leading to a sizeable memory leak; std FDs in pseudo-children are now closed automatically to avoid resource leaks; basic infinite looping fork() test works without leaking again in non-PERL_OBJECT build p4raw-id: //depot/perl@5761
* perldelta update, typos and whitespace adjustmentsGurusamy Sarathy2000-03-111-6/+5
| | | p4raw-id: //depot/perl@5640
* patch to fix mingw32 build under USE_IMP_SYS (from Benjamin Stuhl);Gurusamy Sarathy2000-03-021-0/+3
| | | | | some parts not applied p4raw-id: //depot/perl@5445
* Windows miscellanyGurusamy Sarathy2000-03-011-0/+4
| | | p4raw-id: //depot/perl@5388
* support fetching current interpreter from TLS under useithreadsGurusamy Sarathy2000-02-291-26/+4
| | | p4raw-id: //depot/perl@5342
* various Windows tweaks: make $^E a little less buggy by savingGurusamy Sarathy2000-02-071-2/+8
| | | | | | and restoring system error across TLS fetch; avoid needless copying of buffers p4raw-id: //depot/perl@5024
* windows build fixups from uniform DLL name change to perl56.dllGurusamy Sarathy2000-01-251-74/+36
| | | p4raw-id: //depot/perl@4884
* Win9x + GCC update from Benjamin Stuhl <sho_pi@hotmail.com>Gurusamy Sarathy1999-12-281-1/+1
| | | p4raw-id: //depot/perl@4729
* minor USE_ITHREADS tweaksGurusamy Sarathy1999-12-011-1/+0
| | | p4raw-id: //depot/perl@4603
* more complete pseudo-fork() support for WindowsGurusamy Sarathy1999-12-011-1352/+150
| | | p4raw-id: //depot/perl@4602
* cosmetic tweaksGurusamy Sarathy1999-11-141-2/+0
| | | p4raw-id: //depot/perl@4584
* sundry cleanups for cloned interpreters (only known failure modeGurusamy Sarathy1999-11-141-5/+11
| | | | | | is due to regexps keeping non-constant data in their compiled structures) p4raw-id: //depot/perl@4579
* [5.005_62 PATCH] support link() on WinNT and NTFSJan Dubois1999-11-131-0/+7
| | | | | | | | To: perl5-porters@perl.org, Perl-Win32-Porters@activestate.com Cc: Douglas Lankshear <dougl@activestate.com>, Gurusamy Sarathy <gsar@activestate.com> Message-ID: <382b5d24.10899522@smtprelay.t-online.de> p4raw-id: //depot/cfgperl@4571
* cloned interpreters now actually run and pass all but 55/10386Gurusamy Sarathy1999-11-131-2/+4
| | | | | | | | | | | | | | | | | | | subtests; various subtle bugs, new and old, observed when running cloned interpreters have been fixed still to do: | * dup psig_ptr table | * merge PADOP GVs support with "our" SVs (existing PADOPs are too | simple-minded and grab one pad entry each, heavily bloating | the pad by not avoiding dups) | * overloaded constants are not really immutable--they need to | be PADOPs | * allocator for constants and OPs need to be spelled differently | (shared vs interpreter-local allocations) | * optree refcounting is still missing locking (macros are in place) | * curstackinfo, {mark,scope,save,ret}stack need to be cloned so | perl_clone() can be called from within runops*() p4raw-id: //depot/perl@4553
* another change towards a shareable optree: avoid pointer to filegvGurusamy Sarathy1999-11-111-1/+1
| | | | | | | | | in COP; revert parts of change#4485 and s/xcv_filegv/xcv_file/ (CvFILE() may yet come in handy somewhere); adjust compiler doodads to suit p4raw-link: @4485 on //depot/perl: b195d4879f55e1610299cb9b1b55356940c2a577 p4raw-id: //depot/perl@4545
* preliminary support for perl_clone() (still needs work inGurusamy Sarathy1999-11-081-0/+8
| | | | | | | | the following areas: SVOPs must indirect via pad; context stack, scope stack, and runlevels must be cloned; must hook up the virtualized pseudo-process support provided by "host"; ...) p4raw-id: //depot/perl@4538
* win32 tweakGurusamy Sarathy1999-10-251-0/+1
| | | p4raw-id: //depot/perl@4450
* support PERL_IMPLICIT_SYS with MULTIPLICITY/USE_THREADS onGurusamy Sarathy1999-10-171-196/+213
| | | | | windows p4raw-id: //depot/perl@4402
* misc PERL_OBJECT tweaks; perlcore.dll is now perl56.dllGurusamy Sarathy1999-07-281-9/+57
| | | p4raw-id: //depot/perl@3819
* yet more cleanups of the PERL_OBJECT, MULTIPLICITY and USE_THREADSGurusamy Sarathy1999-07-121-33/+26
| | | | | | | | | | | | | | | | builds; passing the implicit context is unified among the three flavors; PERL_IMPLICIT_CONTEXT is auto-enabled under all three flavors (see the top of perl.h) for testing; all varargs functions foo() have a va_list-taking variant vfoo() for generating the context-free versions; the PERL_OBJECT build should now be hyper-compatible with CPAN extensions (C++ is totally out of the picture) result has only been tested on Windows TODO: write docs on the THX rationale and idiomatic usage of the Perl API p4raw-id: //depot/perl@3667