summaryrefslogtreecommitdiff
path: root/ext/Errno
Commit message (Collapse)AuthorAgeFilesLines
* Silence noise from Errno_pm.PL on WindowsSteve Hay2013-09-161-1/+1
| | | | | | | | | | | | | | | A block of warnings like this appears when building Errno with VC++: Number found where operator expected at (eval 633) line 1, near ")0xC0000093" (Missing operator before 0xC0000093?) This is caused by #defines like these in the Windows header files: WinBase.h:#define EXCEPTION_FLT_UNDERFLOW STATUS_FLOAT_UNDERFLOW WinNT.h:#define STATUS_FLOAT_UNDERFLOW ((DWORD )0xC0000093L) and can be silenced by teaching Errno_pm.PL about the otherwise unexpected whitespace immediately after "DWORD" in the cast.
* Fix the #include of winsock2.h in win32/include/sys/errno2.hSteve Hay2013-09-161-1/+0
| | | | | | | | | | | | | | | | | | | | | | | For some reason (I didn't figure out why) cpan/Win32/Win32.xs did not compile as of the previous commit, but in any case we cannot just blindly include winsock2.h because (a) it is too late if winsock.h has already been included and (b) early WinCE doesn't have it. The definition of _WINSOCKAPI_ was also wrongly not updated to _WINSOCK2API_ but was mistaken in its comment "Don't drag in everything" anyway: it's actually just an old-fashioned "include guard", not a means to include a minimal API from the file. (The mistaken comment came from the original ext/Errno/Errno_pm.PL before this round of $!-related changes. That file also had a redundant "#include <winsock.h>" left in it which should have been removed along with earlier work that removed the other one, so tidy that up too.) Steal a hopefully more correct incantation from win32/include/sys/socket.h instead. Now that we allow for the possibility of winsock.h being used again, we must take care not to make use of WSAECANCELLED if it is not defined. (That is the only WSAExxx constant which we use that was new in winsock2.h.)
* Fix a problem with mod_perl on Windows using VS2010+.Steve Hay2013-09-161-17/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is caused by the following two commits, which sought to deal with new Exxx values (with values >= 100) in errno.h which Microsoft added in VS2010: http://perl5.git.perl.org/perl.git/commit/b59e75b34cef3fedd214c9b6ee744146cf8b3308 http://perl5.git.perl.org/perl.git/commit/912c63ed00375338703043928cac3c740d00cc9d The former commit was mostly a patch to Errno and POSIX, together with some other cleaning up in win32/win32.h and win32/include/sys/socket.h; the latter commit was a fixup to win32/include/sys/socket.h which restored (more aggressively) the ENOTSOCK->WSAENOTSOCK redefinition and added similar redefinitions for ECONNABORTED, ECONNRESET and EAFNOSUPPORT. It is the latter commit which causes this little program to output ECONNABORTED=10053 rather than ECONNABORTED=106 as it ought to do in VC10 (and higher) builds of perl: #include <windows.h> #include "EXTERN.h" #include "perl.h" #include "XSUB.h" void main(void) { printf("ECONNABORTED=%d\n", ECONNABORTED); } That change is now causing problems with mod_perl, in which the (Perl level) APR::Status::is_ECONNABORTED() and the (C level) APR_STATUS_IS_ECONNABORTED() which it calls are failing to recognize an aborted connection (indicated by error code ECONNABORTED set by Apache httpd.exe). The APR_STATUS_IS_ECONNABORTED() macro is picked up by mod_perl from APR's apr_errno.h: #define APR_STATUS_IS_ECONNABORTED(s) ((s) == APR_ECONNABORTED \ || (s) == APR_OS_START_SYSERR + WSAECONNABORTED) where #ifdef ECONNABORTED #define APR_ECONNABORTED ECONNABORTED #else #define APR_ECONNABORTED (APR_OS_START_CANONERR + 18) #endif When this is compiled into httpd.exe ECONNABORTED is 106 (from errno.h) and APR_STATUS_IS_ECONNABORTED(s) amounts to #define APR_STATUS_IS_ECONNABORTED(s) ((s) == 106 || (s) == 730053) but when compiled into APR/Status.dll ECONNABORTED is 10053 (redefined to WSAECONNABORTED as above) so APR_STATUS_IS_ECONNABORTED(s) then amounts to #define APR_STATUS_IS_ECONNABORTED(s) ((s) == 10053 || (s) == 730053) which doesn't pick up an error code of 106 coming from httpd.exe. This could be worked around in mod_perl by redefining ECONNABORTED and the other three back to their original errno.h values to match what httpd.exe is using, but that might just cause problems in the other direction, with those values no longer matching the values which perl.exe is using. Moreoever, this problem could affect other XS interfaces (not just mod_perl), so it really needs to be fixed in perl. This commit implements the alternative solution mentioned the commit message for the first commit cited above. (As noted in that previous commit message, this solution equally has potential problems, missing out on the advantages of the original solution implemented, namely, better backwards compatibility with other perl code having hard-coded numeric error codes, but this will be unavoidable if we want to get to a sane state.) Note that changing the $! values is an incompatible change, so should probably not be done for 5.18.x. That's unfortunate for mod_perl (and anything else similarly affected), but that will just have to either live with the breakage (which was introduced in 5.14.0) until 5.20.0 or else try the workaround mentioned above for 5.14.x, 5.16.x and 5.18.x. The main change is to use a new function throughout win32/win32sck.c to convert WSAGetLastError() values into errno.h constants before assigning to errno. Every possible WSAExxx value (as documented by MSDN) is mapped to an Exxx value, although it is still possible for other WSAxxx values to get assigned to errno unchanged (but that has always been the case, and any non-existent Exxx values get mapped back to WSAExxx values anyway...). We must then ensure that all of those Exxx values are defined, which is now done (in the new file, win32/include/sys/errno2.h) in a friendlier manner, being careful not to redefine any (specifically the new ones in VC++ 2010 and above) which already exist. The rest are defined as the WSAExxx values, as mentioned above. Finally, we need the Errno module to know about these values, which is done by having it include that same new header file to ensure that it gets the same definitions, rather than having to play its own games. The new header is also used in POSIX, which similarly wants definitions of as many as possible of its hard-coded list of Exxx values.
* Generate Errno and Pod::Functions with deterministic order.Nicholas Clark2013-07-131-2/+2
| | | | | | | | | Previously the order of duplicate names in Errno was determined by hash iteration order, as was the order of the list of types for built-ins in Pod::Functions. With hash randomisation this meant that the generated file could differ between builds, which isn't ideal if the input is the same. (Spotted as a side effect of running a diff on two installation trees.)
* Remove the BeOS port.Nicholas Clark2012-12-141-39/+3
| | | | | | | | | BeOS was an operating system for personal computers developed by Be Inc, initially for their BeBox hardware. The OS Haiku was written as an open source replacement/continuation for BeOS, and its perl port is current and actively maintained. The BeOS port has not been updated since 2004.
* Remove the EPOC port.Nicholas Clark2012-11-191-4/+1
| | | | | | | EPOC was a family of operating systems developed by Psion for mobile devices. It was the predecessor of Symbian. The port was last updated in April 2002.
* Remove the VM/ESA port.Nicholas Clark2012-08-311-4/+1
| | | | | VM/ESA was a mainframe OS. IBM ended service on it in June 2003. It was superseded by Z/VM.
* Errno does not escape archnameReini Urban2011-11-021-3/+7
| | | | | | | With a @ or $ or % character in the user-choosen archname, Errno fails. I usually use @ to denote git tags in the archlib. E.g. Possible unintended interpolation of @khwtk in string at ../lib/Errno.pm line 12
* The Borland Chainsaw MassacreSteve Hay2011-09-101-8/+2
| | | | | 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
* Redefine errno values for Visual Studio 2010Steve Hay2011-03-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Perl traditionally stores WinSock error codes (values above 10000) in errno, with corresponding support for $! to stringify them properly. In Visual Studio 2010 (and presumably newer Windows SDKs) Microsoft has started to define additional errno constants in errno.h (values between 100 and 200) with conflicting names (e.g. EWOULDBLOCK). There are 2 ways to deal with this situation: 1) Redefine the errno.h constants back to the winsock values for the Errno and POSIX modules. 2) Translate the winsock error codes to the new errno constants in the socket implementation in win32/win32sck.c. Solution 1) has the advantage that any existing Perl code that has numeric error codes hard-coded in it will continue to work. Solution 2) has the advantage that XS code using external libaries can set errno to the new constants, and they will be handled consistently in the Perl core. It will however need additional support for other compilers and runtime libraries that don't support these new error codes. This commit implements solution 1). Blame attribution: the commit message is from Jan Dubois, the actual patch was created by Steve Hay. Signed-off-by: Jan Dubois <jand@activestate.com>
* Ensure that the C<exists &Errno::EFOO> idiom continues to work as documented.Nicholas Clark2011-03-072-3/+29
| | | | | | | A change post-5.12 (probably 42607a60df6df19b) caused the documented idiom not to work if Errno was loaded after the C<exists> code had been compiled, as the compiler implicitly creates typeglobs in the Errno symbol table when it builds the optree for the C<exists code>.
* In Errno, use typeglob aliasing instead of subref to typeglob assignment.Nicholas Clark2011-02-191-2/+1
| | | | | | | Typeglob aliasing saves just over .5K, because fewer internal structures are created. In the general case the behaviour of the two differs, but as the only package variables of these names are subroutines, and we are within our own namespace, there is no difference here.
* Remove Mac OS classic code from the Errno.pm generation script.Nicholas Clark2011-01-191-19/+7
|
* Bump $Errno::VERSION after change be54382Florian Ragwitz2010-09-031-1/+1
|
* Sanity check on Errno values.Curtis Jewell2010-09-021-2/+3
| | | | | | On a few machines (Win32/gcc using mingw64 headers) Errno.pm will find a value that is not numeric for a proposed error key. This change adds a sanity check to discard such keys.
* Tweak the generated Errno.pm slightly. Shorter and slightly fewer ops.Nicholas Clark2010-06-231-8/+7
| | | | | | | Use our directly at the first assignment, rather than on a line by itself. Add editor readonly blocks, consistent with most other generated files. require Exporter, rather than using it with an empty import list. We don't need it at compile time.
* Reduce Errno memory usage by around 55%.Nicholas Clark2010-05-021-33/+36
| | | | | Use Proxy Constant Subroutines rather than full-fat subroutines, and simplify the implementation of the tied hash methods.
* Remove unused %errno and $AUTOLOAD from the generated Errno.pmNicholas Clark2010-05-021-1/+1
|
* Remove the lexical $len and associated calculation, which is never used.Nicholas Clark2010-05-011-3/+1
|
* Make extensions in ext run their tests from the extension's own directory.Nicholas Clark2009-08-281-11/+0
| | | | | | | | | | | Inspired by, and in parts borrows from, Schwern's branch on github, but takes a slightly different approach in places. Not quite perfect yet - ext/File-Glob still runs from t, at least one FIXME needs fixing, and the changes to dual-life modules' tests need to be filtered back upstream, and possibly modified to suit their respective authors. But it works.
* As Errno is formally no longer dual-lived, give it a proper version number.Nicholas Clark2009-06-251-1/+1
|
* Mark all .t and .pm files as non executableRafael Garcia-Suarez2009-06-061-0/+0
|
* Close the file before renaming it. Problem spotted and fix supplied by corion.Nicholas Clark2009-03-311-0/+2
|
* Don't create an empty Errno.pm if there is an error whilst running Errno_pm.PLNicholas Clark2009-03-311-1/+3
| | | | | Implemented by initially writing to an temporary file name, and renaming as the last act.
* Remove now-redundant references to MAN3PODS in core modules' Makefile.PLs.Nicholas Clark2009-03-261-4/+0
|
* bump Errno version number after change 34630 (add Haiku port)David Mitchell2009-01-041-1/+1
|
* [admin] set up .gitignore filesSam Vilain2008-12-191-0/+2
| | | | | A list submitted by Paul Fenwick was briefly factored into directory-specific rules.
* Haiku PortIngo Weinhold2008-10-291-1/+1
| | | | | Message-Id: <20081029022544.413.1@knochen-vm.localdomain> p4raw-id: //depot/perl@34630
* Upgrade to Errno-1.10 (!). I have left the core tests as is forSteve Peters2006-12-272-1/+6
| | | | | now as well as for Makefile.PL, which need some looking into. p4raw-id: //depot/perl@29627
* Proper cleanup for Errno.pmRafael Garcia-Suarez2006-12-191-1/+1
| | | p4raw-id: //depot/perl@29595
* Re: [PATCH] Errno doesnt rebuild when things it depends on in Config.pm changeYves Orton2006-12-151-0/+19
| | | | | Message-ID: <9b18b3110612150352y2394954bg5acd5ec5fd320d33@mail.gmail.com> p4raw-id: //depot/perl@29558
* Convert Errno.t to Test::More. Increase the test coverageSteve Peters2006-09-071-35/+24
| | | | | while in there as well. p4raw-id: //depot/perl@28794
* One too many ('s in change #28043. Steve Peters2006-05-021-1/+1
| | | | | p4raw-link: @28043 on //depot/perl: e9014798f4f634151d92887db69bde2b6ef69071 p4raw-id: //depot/perl@28046
* Fix for RT #7916: perl 5.6.1 with Intel's icc on RedHat Steve Peters2006-05-021-1/+3
| | | | | | | | | | Linux 7.2. The original fix, change #13053, added a check for $Config{gccversion} which is now populated by newer Intel compilers. This additional change checks to see if Intel is in $Config{gccversion}. If it is, its not a gcc. p4raw-link: @13053 on //depot/perl: 022394cfaaa8ec20e603e5da621b1778fd79e4ad p4raw-id: //depot/perl@28043
* Support compiling for RISC OSAlex Waugh2006-04-181-0/+6
| | | | | Message-ID: <2498b2184e.ajw498@caramel.cp15.org> p4raw-id: //depot/perl@27884
* Re: How to suppress warnings when building Errno with gccYitzchak Scott-Thoennes2005-07-041-2/+2
| | | | | Message-ID: <20050701175623.GD216@efn.org> p4raw-id: //depot/perl@25063
* Silence MinGW warnings about system headers when building ErrnoSteve Hay2005-06-301-2/+20
| | | | | Thanks to Mike Guy for the suggested fix. p4raw-id: //depot/perl@25014
* Symbian port of PerlJarkko Hietaniemi2005-04-211-10/+24
| | | | | Message-ID: <B356D8F434D20B40A8CEDAEC305A1F2453D653@esebe105.NOE.Nokia.com> p4raw-id: //depot/perl@24271
* ext/Errno/Errno_pm.PL: fix for GNU hurdBrendan O'Dea2005-03-301-1/+1
| | | | | Message-ID: <20050330003025.GA29797@londo.c47.org> p4raw-id: //depot/perl@24101
* Fix for building with MinGW under CygwinYitzchak Scott-Thoennes2005-01-171-1/+7
| | | | | | Subject: [PATCH] building win32 perl with cygwin's mingw (was: Re: [PATCH] Re: lib/Config/Extensions.t fails on Win32) Message-ID: <20050114001136.GC2516@efn.org> p4raw-id: //depot/perl@23807
* [perl #32717] BeOS specific Updates Ingo Weinhold2004-12-011-4/+6
| | | | | | From: Ingo Weinhold (via RT) <perlbug-followup@perl.org> Message-ID: <rt-3.0.11-32717-101307.19.7097750538509@perl.org> p4raw-id: //depot/perl@23584
* Fix [perl #32130] Errno.pm must not pass references to "prototype"Rafael Garcia-Suarez2004-10-252-2/+6
| | | p4raw-id: //depot/perl@23424
* Zaurus SL-[78]60 native compile patchDan Kogai2004-03-301-1/+3
| | | | | | Message-Id: <46DCC0BF-8199-11D8-8D5B-000A95DBB50A@dan.co.jp> Date: Tue, 30 Mar 2004 00:53:52 +0900 p4raw-id: //depot/perl@22614
* ESUCCESS = 0 is not true, but exists.Jarkko Hietaniemi2003-08-061-1/+2
| | | p4raw-id: //depot/perl@20535
* maint, Win32, GCC 3.2Mattia Barbon2003-08-041-1/+9
| | | | | Message-ID: <Mahogany-0.64.2-624-20030802-103107.00@rbnet.it> p4raw-id: //depot/perl@20469
* No more ext/*/*.t, move them all to ext/*/t.Jarkko Hietaniemi2003-07-281-0/+0
| | | p4raw-id: //depot/perl@20269
* Re: [PATCH] Version tangoYitzchak Scott-Thoennes2002-05-271-0/+1
| | | | | Message-ID: <oUp88gzkgy+T092yn@efn.org> p4raw-id: //depot/perl@16822
* Windows 64-bit support:Gurusamy Sarathy2002-04-211-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | * support for building it in the regular makefiles * large files support via the _*i64() functions (this should be portable to the 32-bit universe too, but quite untested and and binary-incompatible, therefore not enabled there) * three additional test failures in addition to the t/end.t one (see README.win32) * sprintf() on Windows gets %I{32,64,}[xoud] format that parallel the ones available from the CRT (needed because Perl uses the UVxf macros in both sprintf() *and* in sv_catpvf() et al.) * add a few 64-bit notes to README.win32 The following general problems were also fixed: * s/struct stat/Stat_t/g * Data::Dumper had some naughty 'long' typecasts * Errno_pm.PL didn't work safe when winsock.h was not in the same directory as errno.h * various tell/seek things were incorrectly prototyped * squelch ugly looking noise when running tests * Embed.t wasn't linking in all the libraries * perl57.dll is now perl58.dll (anticipating 5.8.0-RC1) * re-enable all the disabled warnings (additional fixes may be needed for the warnings uncovered by this) p4raw-id: //depot/perl@16033
* Last patch needed to get Perl5.7 to build natively on VOSPaul Green2002-01-071-0/+3
| | | | | Message-Id: <95AE3CDB3543D511883A0020485B38B90235349B@exna3.stratus.com> p4raw-id: //depot/perl@14124
* Win32 hides some errno-oid constants in <winsock.h> under assumed names.Nick Ing-Simmons2001-12-301-4/+24
| | | | | This gets them into Errno.pm - yet to prove they end up in $!. p4raw-id: //depot/perlio@13950