This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
10 years agoAndroid hints: Only set userelocatableinc if it doesn't have a value
Brian Fraser [Wed, 21 Aug 2013 03:38:14 +0000 (00:38 -0300)]
Android hints: Only set userelocatableinc if it doesn't have a value

Without this, Configure would've bailed out if trying to build a
-Duseshrplib perl.

10 years agohints/linux-androideabi.sh: If the host OS is darwin, set firstmakefile to GNUmakefile
Brian Fraser [Sun, 11 Aug 2013 21:43:17 +0000 (18:43 -0300)]
hints/linux-androideabi.sh: If the host OS is darwin, set firstmakefile to GNUmakefile

10 years agohints/linux-androideabi.sh: use $chmod instead of plain chmod
Brian Fraser [Sun, 11 Aug 2013 21:38:05 +0000 (18:38 -0300)]
hints/linux-androideabi.sh: use $chmod instead of plain chmod

10 years agohints/linux-androideabi.sh: use $cat instead of plain cat
Brian Fraser [Sun, 11 Aug 2013 21:37:35 +0000 (18:37 -0300)]
hints/linux-androideabi.sh: use $cat instead of plain cat

10 years agohints/linux-androideabi.sh: adb takes care of creating the target dir on the target
Brian Fraser [Sun, 11 Aug 2013 21:30:18 +0000 (18:30 -0300)]
hints/linux-androideabi.sh: adb takes care of creating the target dir on the target

10 years agohints/linux-androideabi.sh: sed might not understand "\r", use $tr instead
Brian Fraser [Sun, 11 Aug 2013 20:49:13 +0000 (17:49 -0300)]
hints/linux-androideabi.sh: sed might not understand "\r", use $tr instead

10 years agohints/linux-androideabi.sh: Rather than relaying on adb, save the exit status in...
Brian Fraser [Fri, 9 Aug 2013 09:39:49 +0000 (06:39 -0300)]
hints/linux-androideabi.sh: Rather than relaying on adb, save the exit status in a file and then copy it over

10 years agohints/linux-androideabi.sh: getservent_r() is a partial stub, mark it as undefined...
Brian Fraser [Sat, 18 May 2013 02:14:49 +0000 (23:14 -0300)]
hints/linux-androideabi.sh: getservent_r() is a partial stub, mark it as undefined to avoid issues with threads

10 years agoandroid hints: Always define d_libname_unique
Brian Fraser [Wed, 15 May 2013 12:09:58 +0000 (09:09 -0300)]
android hints: Always define d_libname_unique

10 years agoAndroid hints: Detect stub functions and mark them as undefined.
Brian Fraser [Sun, 28 Apr 2013 00:01:44 +0000 (21:01 -0300)]
Android hints: Detect stub functions and mark them as undefined.

Bionic implements several functions as stumps that simply warn
and return null, which leads to situations like this:

FIX ME! implement getprotobyname() bionic/libc/bionic/stubs.c:378

This commit introduces some probes for functions (getnetbyname,
getnetbyaddr, getmntent, getprotobyname, getprotobynumber, endpwent,
ttyname) that we use and are actually stubs in at least some
versions of Android.
If we find a stub, we pretend that the function is undefined, so
the above example becomes this:

Unsupported socket function "getprotobyname" called at -e line 1.

Note that this commit does not fix the modules that assume that
these functions are always available, so 'make test' still fails.

10 years agoCorrectly quote result from adb, otherwise multiline responses breal (eg signal_cmd)
Jess Robinson [Sat, 11 May 2013 13:37:39 +0000 (14:37 +0100)]
Correctly quote result from adb, otherwise multiline responses breal (eg signal_cmd)

10 years agoAndroid hints, run-ssh: Make sure that the stdout of commands run from Configure...
Jess Robinson [Mon, 29 Apr 2013 08:54:35 +0000 (09:54 +0100)]
Android hints, run-ssh: Make sure that the stdout of commands run from Configure and Makefile on remote hosts is transfered back correctly

10 years agoNo locales in Android, just set the lot to undef
Jess Robinson [Fri, 19 Apr 2013 11:18:46 +0000 (12:18 +0100)]
No locales in Android, just set the lot to undef

10 years agoAndroid hints, run-adb-shell: Handle the -env switch
Jess Robinson [Fri, 19 Apr 2013 11:00:14 +0000 (12:00 +0100)]
Android hints, run-adb-shell: Handle the -env switch

Currently, this is used during 'make test' to specify LD_LIBRARY_PATH

10 years agoAndroid hints: set targetsh to /system/bin/sh
Jess Robinson [Thu, 31 Jan 2013 14:15:17 +0000 (14:15 +0000)]
Android hints: set targetsh to /system/bin/sh

Android, for reasons best known to itself, doesn't have a "/bin/sh" it
has a "/system/bin/sh".  We need to run "/bin/sh" as $sh inside
./Configure on the host, but store a different path for use on the
actual Android system (eg by backticks, system etc, in SH_PATH).

The new variable is "targetsh" and defaults to "sh" unless changed by the hints file/Configure params.

10 years agoCreate a Perl with relocatable inc when building for Android.
Jess Robinson [Fri, 18 Jan 2013 18:55:02 +0000 (18:55 +0000)]
Create a Perl with relocatable inc when building for Android.

10 years agoHints file for android cross-compiling.
Jess Robinson [Fri, 4 Jan 2013 10:48:34 +0000 (10:48 +0000)]
Hints file for android cross-compiling.

The hints file names for cross-compiling (currently) need to match the prefix of the cross-compiler used.

10 years agoLinux hints: Improve the code that looks for libc.so
Brian Fraser [Wed, 22 Jan 2014 22:33:51 +0000 (19:33 -0300)]
Linux hints: Improve the code that looks for libc.so

10 years agoLinux hints: Improve the portability of the -lndbm check
Brian Fraser [Wed, 22 Jan 2014 20:19:28 +0000 (17:19 -0300)]
Linux hints: Improve the portability of the -lndbm check

10 years agoLinux hints: add some missing $ccflags
Brian Fraser [Wed, 22 Jan 2014 20:17:33 +0000 (17:17 -0300)]
Linux hints: add some missing $ccflags

10 years agoLinux hints: Handle `uname -m` in cross-compilation builds
Brian Fraser [Wed, 22 Jan 2014 20:14:59 +0000 (17:14 -0300)]
Linux hints: Handle `uname -m` in cross-compilation builds

10 years agoLinux hints: try using user-provided binaries before going for the defaults
Brian Fraser [Wed, 22 Jan 2014 20:13:25 +0000 (17:13 -0300)]
Linux hints: try using user-provided binaries before going for the defaults

This means that if the user called Configure with -Dnm=/foo/bar/nm, the
hints will try using that before going for plain 'nm'

10 years agoMake it clear what it means if there's no distinction between -M and -m.
Abigail [Sun, 26 Jan 2014 15:51:14 +0000 (16:51 +0100)]
Make it clear what it means if there's no distinction between -M and -m.

Triggered by perl #121078, where someone thought one could mimic the
behaviour of C<-m> by a clever use of C<-M> and C<=>.

10 years agotargetsh in configure.com again
Craig A. Berry [Sun, 26 Jan 2014 15:45:28 +0000 (09:45 -0600)]
targetsh in configure.com again

In 9056626be4b0df I had set it to empty string, but thanks to a
heads up from Brian Fraser I've realized it should be the same
thing as sh as it is now used to set up SH_PATH.

10 years agoFix targetsh in configure.com.
Craig A. Berry [Sat, 25 Jan 2014 20:48:51 +0000 (14:48 -0600)]
Fix targetsh in configure.com.

Specifically, there is no 'sh' variable, so if we try to reference
it we get:

%DCL-W-UNDSYM, undefined symbol - check validity and spelling
 \SH\

So enter an empty string for targetsh.

10 years agoMake fileify handle node specifications better.
Craig A. Berry [Sat, 25 Jan 2014 16:50:02 +0000 (10:50 -0600)]
Make fileify handle node specifications better.

In particular, a node specification containing only a single
directory (i.e., node::dev:[dir]) was not being handled properly.

This came up while reproducing the problem in [perl #121002] but
was not the cause of that problem as the OP's directory had
multiple subdirectories in it.

10 years agoIn vms.c's Perl_opendir, skip access check on remotes.
Craig A. Berry [Sat, 25 Jan 2014 15:52:09 +0000 (09:52 -0600)]
In vms.c's Perl_opendir, skip access check on remotes.

As reported in [perl #121002], the homegrown opendir has been
failing when the directory specification contains a DECNet node
specification indicating the directory to be accessed is on a
remote node.  The OP reports this worked with Perl 5.001 but not
5.8.6 or 5.18.2.

It appears that the culprit was the introduction of access
checking to Perl_opendir in 61bb59065bf1b12edab39b12, which would
first have been released in 5.004.  Yes, it's been broken for 17
years.

The reason access checking broke remote access is that it's based
on SYS$CHECK_ACCESS, which apparently does not work on remotes,
though the only hint of that in its documentation is that the
status SS$_UNSUPPORTED, "Operations on remote object are not
supported" is listed as a possible return value.  What it actually
returns, despite the documentation, is SS$_INVFILFOROP, "invalid
file specification for operation."

The fix is simple enough -- just skip the access check if the
directory name contains a node specification (which always ends
with "::").  All the access check is providing is a friendlier
error message in cases where we don't have access, so no harm is
done by skipping the check in cases where it can't work.

10 years agoresolve bug 121070 - preserve $^R after successful match
Yves Orton [Sat, 25 Jan 2014 15:48:56 +0000 (16:48 +0100)]
resolve bug 121070 - preserve $^R after successful match

We call LEAVE after successful eval matches, which clears $^R.

This changes a test that was added as part of handling bug 56194.

10 years agoMakefile.SH, make test: Copy config.sh when cross-compiling
Brian Fraser [Sat, 25 Jan 2014 15:38:04 +0000 (12:38 -0300)]
Makefile.SH, make test: Copy config.sh when cross-compiling

t/TEST uses this to determine which extensions to run tests for;
if it's missing, it'll end up running everything, which means a ton of
failures from, say, Win32 and VMS if cross-compiling to Linux.

10 years agot/porting/: Skips for cross-compilation
Brian Fraser [Wed, 13 Nov 2013 04:11:12 +0000 (01:11 -0300)]
t/porting/: Skips for cross-compilation

10 years agoUpdate Module-Load to CPAN version 0.30
Chris 'BinGOs' Williams [Sat, 25 Jan 2014 13:38:10 +0000 (13:38 +0000)]
Update Module-Load to CPAN version 0.30

  [DELTA]

0.30    Sat Jan 25 13:26:51 GMT 2014
* Fix 'uninitialized' warnings during testing
* Added done_testing() to tests

10 years agoUpdate Module-Load-Conditional to CPAN version 0.62
Chris 'BinGOs' Williams [Sat, 25 Jan 2014 13:37:15 +0000 (13:37 +0000)]
Update Module-Load-Conditional to CPAN version 0.62

  [DELTA]

0.62    Fri Jan 24 15:52:44 GMT 2014

* Resolve test failures on v5.16.x

10 years agoUpdate File-Fetch to CPAN version 0.48
Chris 'BinGOs' Williams [Sat, 25 Jan 2014 13:35:57 +0000 (13:35 +0000)]
Update File-Fetch to CPAN version 0.48

  [DELTA]

0.48        Fri Jan 24 10:32:52 2014

* Force curl to be IPv4 only during testing
  on NetBSD

10 years agoFile::Spec::Unix->tmpdir: Always return an absolute path
Brian Fraser [Fri, 17 Jan 2014 17:53:58 +0000 (14:53 -0300)]
File::Spec::Unix->tmpdir: Always return an absolute path

This is generally a non-issue, however, if /tmp doesn't exist
and $ENV{TMPDIR} isn't set, ->tmpdir() used to return ".", which
broke the following pattern:

    use File::Temp qw(tempdir);
    use File::Spec;
    my $tmpdir = tempdir(CLEANUP => 1);
    chdir $tmpdir;
    my $file = File::Spec->catfile($tmpdir, "foo");
    open my $fh, ">", $file or die $!;

Because $tmpdir would be something like 'bfhskjf94589', and after
the chdir, the open() would've tried to open $tmpdir/$tmpdir/foo.

Note that this is only the case when not running in taint mode.  If taint
is enabled, ->tmpdir will still return '.'; this mirrors the behavior of
File::Temp.

10 years agoUpgrade Scalar-List-Utils from version 1.37 to 1.38
Steve Hay [Fri, 24 Jan 2014 09:02:59 +0000 (09:02 +0000)]
Upgrade Scalar-List-Utils from version 1.37 to 1.38

10 years agoFix $ENV{PATH} flags in Peek.t.
Craig A. Berry [Fri, 24 Jan 2014 00:50:58 +0000 (18:50 -0600)]
Fix $ENV{PATH} flags in Peek.t.

Setting $ENV{PATH} explicitly in bea5cecf09ba646ff0ff made us no
longer have the TEMP flag set on VMS, so make it optional.

10 years agolib/locale.pm: Pod corrections
Karl Williamson [Fri, 24 Jan 2014 01:04:41 +0000 (18:04 -0700)]
lib/locale.pm: Pod corrections

10 years agoAllow 'use locale' on systems without locales.
Karl Williamson [Wed, 22 Jan 2014 21:23:26 +0000 (14:23 -0700)]
Allow 'use locale' on systems without locales.

Instead of throwing an error, just go ahead and do the import.
This will tell Perl internally to use the current underlying locale,
which should be the C locale.  Attempts to change the locale will fail.

This differs slightly from Brian Fraser's patch, in that his didn't
touch $^H, thus 'use locale' was a no-op.  He has told me to apply this
one, which does affect $^H.  The advantage here is that now programs
that are run on platforms with and without locales will behave
similarly, and should run identically if the locale is not switched from
the default.

10 years agoperllocale: Nit.
Karl Williamson [Wed, 22 Jan 2014 21:42:10 +0000 (14:42 -0700)]
perllocale: Nit.

10 years agoperldelta for -Dtargetsh
Brian Fraser [Thu, 23 Jan 2014 18:45:40 +0000 (19:45 +0100)]
perldelta for -Dtargetsh

10 years agoregen for uconfig.h
Brian Fraser [Thu, 23 Jan 2014 18:05:18 +0000 (19:05 +0100)]
regen for uconfig.h

10 years agoGlossary entry for targetsh
Brian Fraser [Thu, 23 Jan 2014 03:33:13 +0000 (00:33 -0300)]
Glossary entry for targetsh

10 years agoAdded targetsh to all the canned config files
Brian Fraser [Mon, 11 Nov 2013 20:16:58 +0000 (17:16 -0300)]
Added targetsh to all the canned config files

10 years agoSeparate SH used to run Configure from SH used on target system
Jess Robinson [Thu, 31 Jan 2013 14:15:17 +0000 (14:15 +0000)]
Separate SH used to run Configure from SH used on target system

This is because, for example, on the host system, sh might be /bin/sh,
but on the target system, it's /system/bin/sh.

The new variable is "targetsh" and defaults to "sh" unless changed by the hints file/Configure params.

10 years agoloc_tools.pl: FIx to work on Android
Karl Williamson [Thu, 23 Jan 2014 17:52:38 +0000 (10:52 -0700)]
loc_tools.pl: FIx to work on Android

Thanks to Brian Fraser for finding this and suggesting the kernel of
the patch.

The code to try to handle platforms without the POSIX module didn't work
properly.  This code had just been moved, unchanged, here from
lib/locale.t; it never got executed previously due to a skip_all.

This patch also makes sure minitest doesn't fail, and adds some comments

10 years agolocale.c: Silence Win32 compiler warning.
Karl Williamson [Wed, 22 Jan 2014 05:17:20 +0000 (22:17 -0700)]
locale.c: Silence Win32 compiler warning.

This compiler is not smart enough to realize that overflow of a byte
can't occur here as the loop stops at 255.

10 years agoConfigure: add missing ; to checkccflags
Brian Fraser [Thu, 23 Jan 2014 17:52:39 +0000 (18:52 +0100)]
Configure: add missing ; to checkccflags

10 years agohandy.h: Move the _LC_CAST declaration.
Brian Fraser [Thu, 23 Jan 2014 14:57:50 +0000 (15:57 +0100)]
handy.h: Move the _LC_CAST declaration.

Previous it was left so that some systems, like Android, didn't get this,
which broke the build.

10 years agotime64.h: On QNX, use const for tm_zone
Brian Fraser [Fri, 11 Oct 2013 22:30:56 +0000 (19:30 -0300)]
time64.h: On QNX, use const for tm_zone

http://www.qnx.com/developers/docs/6.3.0SP3/neutrino/lib_ref/t/tm.html

10 years agotime64.h: Declare tm_zone as const under Android, but not if using C++
Brian Fraser [Sat, 18 May 2013 02:20:07 +0000 (23:20 -0300)]
time64.h: Declare tm_zone as const under Android, but not if using C++

https://android.googlesource.com/platform/bionic.git/+/master/libc/include/time.h

10 years agoMerge branch 'cross-compile-revamp' into blead
Brian Fraser [Thu, 23 Jan 2014 01:46:07 +0000 (22:46 -0300)]
Merge branch 'cross-compile-revamp' into blead

This branch modifies how the cross-compilation model works.

The main change is that we now build a host miniperl to use locally,
rather than running each call to miniperl remotely.

It also removes several of the exceptions from the old model (no xlib,
xconfig.h, or Cross.pm).

10 years agoUpdate IPC-Cmd to CPAN version 0.92
Chris 'BinGOs' Williams [Wed, 22 Jan 2014 20:28:25 +0000 (20:28 +0000)]
Update IPC-Cmd to CPAN version 0.92

  [DELTA]

0.92 Wed Jan 22 19:57:27 GMT 2014

  Test fixes:
  * Use File::Temp in run_forked tests (hugmeir)

10 years agot/op/magic.t: Use three-arg open to avooid creating a subshell
Brian Fraser [Wed, 22 Jan 2014 17:23:51 +0000 (14:23 -0300)]
t/op/magic.t: Use three-arg open to avooid creating a subshell

10 years agoAdd Darwin shared libraries (dylib) to gitignore
Brian Fraser [Wed, 22 Jan 2014 14:20:59 +0000 (11:20 -0300)]
Add Darwin shared libraries (dylib) to gitignore

10 years agoext/DynaLoader/t/DynaLoader.t: Skip the dl_findfile test when cross-compiling
Brian Fraser [Thu, 10 Oct 2013 23:59:56 +0000 (20:59 -0300)]
ext/DynaLoader/t/DynaLoader.t: Skip the dl_findfile test when cross-compiling

10 years agoMoved a glob test from t/run/fresh_perl.t to t/op/glob.t
Brian Fraser [Tue, 1 Oct 2013 13:35:41 +0000 (10:35 -0300)]
Moved a glob test from t/run/fresh_perl.t to t/op/glob.t

This was done because, currently, the test fails when cross-compiling
perl, but run/fresh_perl.t can't use Config to check if we're cross-
compiling.

10 years agodist/ExtUtils-Install: Skip tests if make is not available
Brian Fraser [Sun, 19 May 2013 07:46:30 +0000 (04:46 -0300)]
dist/ExtUtils-Install: Skip tests if make is not available

10 years agolib/ExtUtils/t/Embed.t: Skip tests is cross-compiling and $Config{cc} is not available
Brian Fraser [Sun, 19 May 2013 07:44:07 +0000 (04:44 -0300)]
lib/ExtUtils/t/Embed.t: Skip tests is cross-compiling and $Config{cc} is not available

10 years agot/lib/warnings/pp_sys: Add skips in case telldir is not available
Brian Fraser [Wed, 24 Apr 2013 22:01:04 +0000 (19:01 -0300)]
t/lib/warnings/pp_sys: Add skips in case telldir is not available

10 years agoperllexwarn: Fit verbatim lines in 79 columns
Karl Williamson [Wed, 22 Jan 2014 18:40:52 +0000 (11:40 -0700)]
perllexwarn: Fit verbatim lines in 79 columns

10 years agoperllocale: Nits, corrections
Karl Williamson [Wed, 22 Jan 2014 17:52:21 +0000 (10:52 -0700)]
perllocale: Nits, corrections

This corrects some formatting nits and grammatical errors, with some
clarifications and corrections to the existing text, and adds coverage
of some previously undocumented functionality.

10 years agoperl.c: Add missing ref count decrement
Karl Williamson [Tue, 21 Jan 2014 23:59:39 +0000 (16:59 -0700)]
perl.c: Add missing ref count decrement

This could have led to a leak.

10 years agolocale.c: White-space only
Karl Williamson [Tue, 21 Jan 2014 23:51:56 +0000 (16:51 -0700)]
locale.c: White-space only

This indents because the previous commit added a block

10 years agolocale.c: Find utf8-8 locales reliably on C99 platforms
Karl Williamson [Tue, 21 Jan 2014 23:25:42 +0000 (16:25 -0700)]
locale.c: Find utf8-8 locales reliably on C99 platforms

locale.c has a function that tries to determine if the current POSIX
locale is a UTF-8 locale.  Prior to this patch, it used nl_langinfo() to
determine this, falling back to heuristics if that is unavailable on the
platform.  nl_langinfo()  is part of POSIX.1-2001.  -This patch adds the
use of two functions from C99, mbtowc() and MB_CUR_MAX,  that also give
reliable results.

10 years agot/loc_tools.pl: Add some locale finding for Win32
Karl Williamson [Tue, 21 Jan 2014 23:01:48 +0000 (16:01 -0700)]
t/loc_tools.pl: Add some locale finding for Win32

This is based on the documentation in
http://msdn.microsoft.com/en-us/library/hzz3tw78.aspx
and linked-to pages.

We try out new locale combinations to see if they are found.

10 years agoMove more common locale finding code into t/loc_tools.pl
Karl Williamson [Mon, 20 Jan 2014 19:58:46 +0000 (12:58 -0700)]
Move more common locale finding code into t/loc_tools.pl

As a result of some code meant to do the same thing being in two
different places, one got updated, and one didn't.  So t/run/locale.t
was being skipped for Win32, even though the bug there it was avoiding
has been fixed in XP.

10 years agot/run/locale.t: Use common code for finding locales
Karl Williamson [Mon, 20 Jan 2014 19:10:59 +0000 (12:10 -0700)]
t/run/locale.t: Use common code for finding locales

Instead of using its own ungeneral code for finding the available
locales on the system, use the new common, and more general, code.

This means this test will now run on more systems, where it currently is
skipped

10 years agot/loc_tools.pl: Extract out finding locales from locale.t
Karl Williamson [Mon, 20 Jan 2014 18:38:44 +0000 (11:38 -0700)]
t/loc_tools.pl: Extract out finding locales from locale.t

Several different test files need to find the locales on the system, and
each currently has rolled its own methods to do that.  This commit
creates a new file t/loc_tools.pl which is designed to be a common
place for these tools.

lib/locale.t did the most thorough job of finding locales, so
t/loc_tools.pl is built upon what it had, which is now deleted from
locale.t.

The code in t/loc_tools.pl was copied from lib/locale.t with white space
changes and changes to make this be a subroutine, and helper functions
renamed to begin with an underscore, and changing the hard-coded list to
be in a DATA section so it doesn't have to be actually used unless
necessary.

10 years agolib/locale.t: Remove no longer needed SKIPS
Karl Williamson [Mon, 20 Jan 2014 18:08:32 +0000 (11:08 -0700)]
lib/locale.t: Remove no longer needed SKIPS

locale.t has changed so if tests in some locales fail, it still passes,
provided that most locales work.  Thus this code whose effect was to
know about some broken locales and SKIP them, is no longer needed.

10 years agoreg_posixcc.t: Improve test names
Karl Williamson [Sun, 19 Jan 2014 04:41:31 +0000 (21:41 -0700)]
reg_posixcc.t: Improve test names

The test names dated to before feature unicode_strings, and were
misleading.

10 years agoregcomp.c: Extract out code into a separate function
Karl Williamson [Fri, 17 Jan 2014 01:21:54 +0000 (18:21 -0700)]
regcomp.c: Extract out code into a separate function

This is in preparation for it to be called from a 2nd place.

10 years agoperlunicode: Wrap some lines
Karl Williamson [Thu, 16 Jan 2014 19:48:39 +0000 (12:48 -0700)]
perlunicode: Wrap some lines

This is to make source readable in 79 column window

10 years agoregcomp.c: Simplify expression
Karl Williamson [Tue, 14 Jan 2014 19:47:53 +0000 (12:47 -0700)]
regcomp.c: Simplify expression

The previous commit has allowed us to remove the separate test for LOC,
and to replace the one for FOLD by ANYOF_LOC_FOLD.  The flags being
tested here can't be true unless LOC is also true, so testing for it is
superfluous.

10 years agoregcomp.c: Move some code to earlier
Karl Williamson [Tue, 14 Jan 2014 19:44:03 +0000 (12:44 -0700)]
regcomp.c: Move some code to earlier

This code isn't affect by and doesn't affect things between where it is
being moved to and where it is now.  Moving it will allow simplification
of an expression and also is needed in future commits

10 years agoAdd some cBOOL casts to macros
Karl Williamson [Tue, 14 Jan 2014 17:31:09 +0000 (10:31 -0700)]
Add some cBOOL casts to macros

I kept getting burned by these macros returning non-zero instead of a
boolean, as they are used as bool parameters to functions.  So I added
cBOOLs to them.

10 years agoperlapi: Tighten strictures against using undocumented things
Karl Williamson [Tue, 14 Jan 2014 17:14:53 +0000 (10:14 -0700)]
perlapi: Tighten strictures against using undocumented things

We didn't actually say that undocumented global variables and macros are
off-limits.

10 years agoComments, white-space
Karl Williamson [Tue, 14 Jan 2014 16:45:49 +0000 (09:45 -0700)]
Comments, white-space

This adds and modifies various comments in several files, rewrapping
some comments to occupy fewer lines but not exceed 79 columns.  And
fixes some indentation and other white space issues.  It includes
removing trailing white space in lines in regcomp.c.  I didn't think it
was worth making a commit for each file.

10 years agoregcomp.c: Don't output empty debugging text
Karl Williamson [Tue, 14 Jan 2014 16:32:34 +0000 (09:32 -0700)]
regcomp.c: Don't output empty debugging text

This code labels the information that is to follow, and was output even
if that information was empty, so it was confusing.  Now output only
when we know that there will be non-empty information to follow

10 years agoregcomp.c: request inlining of single line function
Karl Williamson [Tue, 14 Jan 2014 16:29:58 +0000 (09:29 -0700)]
regcomp.c: request inlining of single line function

10 years agoPanic if regex making a trie under /li
Karl Williamson [Tue, 14 Jan 2014 16:23:39 +0000 (09:23 -0700)]
Panic if regex making a trie under /li

It does not make sense to try to make a trie using data that is not
determinable at runtime.  So don't pretend to try.

10 years agoRename regex internal flag bit
Karl Williamson [Mon, 13 Jan 2014 19:13:18 +0000 (12:13 -0700)]
Rename regex internal flag bit

This is a clearer name; is used internally only in regcomp.c and
regexec.c

10 years agoUse bit instead of node for regex SSC
Karl Williamson [Mon, 13 Jan 2014 06:39:43 +0000 (23:39 -0700)]
Use bit instead of node for regex SSC

The flag bits in regular expression ANYOF nodes are perennially in short
supply.  However there are still plenty of regex nodes possible.  So one
solution to needing to pass more information is to create a node that
encapsulates what is needed.  That is what commit
9aa1e39f96ac28f6ce5d814d9a1eccf1464aba4a did to tell regexec.c that a
particular ANYOF node is for the synthetic start class (SSC).  However
this solution introduces other issues.  If you have to express two
things, then you need a regnode for A, a regnode for B, a regnode for
both A and B, and another regnode for both not A nor B;  With three
things, you need 8 regnodes to express all possible combinations.  This
becomes unwieldy to write code for.  The number of combinations goes way
down if some of them are mutually exclusive.  At the time of that
commit, I thought that a SSC need not ever warn if matching against an
above-Unicode code point.  I was wrong, and that has been corrected
earlier in the 5.19 series.

But it finally came to me how to tell regexec that an ANYOF node is
for the SSC without taking up a flag bit and without requiring a regnode
type.  The 'next_off' field in a regnode tells the engine the offeset in
the regex program to the node it's supposed to go to after processing
this one.  Since the SSC stands alone, its 'next_off' field is unused,
and we can put anything we want in it.  That, however, is not true of
other ANYOF regnodes.  But it turns out that there are certain values
that will never be legitimate in the 'next_off' field in these, and so
this commit uses one of those to signal that this ANYOF field is an SSC.
regnodes come in various sizes, and the offset is in terms of how many
of the smallest ones are there to the next node to look at.  Since ANYOF
nodes are large, the offset is always > 1, and so this commit uses 1 to
indicate an SSC.

10 years agohandy.h: Express locale macros using common base macros
Karl Williamson [Thu, 9 Jan 2014 06:10:06 +0000 (23:10 -0700)]
handy.h: Express locale macros using common base macros

This extracts out the code of looking up POSIX classes in locales to use
base macros common to all of them.  It does this for the NeXT only code
as well as the typical compilations.

This is in preparation for changing the behavior.  Certain things look
weird as they are aligned, etc as part of that preparation.

10 years agohandy.h: Factor out common code
Karl Williamson [Thu, 9 Jan 2014 06:02:38 +0000 (23:02 -0700)]
handy.h: Factor out common code

It turns out that the definitions for isASCII_LC and is_BLANK_LC end up
being the same for all three possible #if platform states, so can just
have them once instead of three times.

It is unlikely that the
    && ! defined(USE_NEXT_CTYPE)
is necessary, because HAS_ISASCII likely won't be defined, but this
makes sure that this doesn't change the previous behavior.

10 years agohandy.h: White-space, comments, pod nit only
Karl Williamson [Thu, 9 Jan 2014 05:59:31 +0000 (22:59 -0700)]
handy.h: White-space, comments, pod nit only

10 years agopp_hot.c: Rmv unnecessary test
Karl Williamson [Thu, 9 Jan 2014 22:29:17 +0000 (15:29 -0700)]
pp_hot.c: Rmv unnecessary test

The strchr() cannot not succeed unless the first test fails, so the
first test need not be tried at all.

10 years agoGlossary entries for host{perl,generate,osname}
Brian Fraser [Wed, 22 Jan 2014 17:01:06 +0000 (14:01 -0300)]
Glossary entries for host{perl,generate,osname}

10 years agoperldelta for the new cross-compilation model
Brian Fraser [Wed, 22 Jan 2014 16:48:46 +0000 (13:48 -0300)]
perldelta for the new cross-compilation model

10 years agoConfigure, Makefile.SH: Allow running generate_uudmap in the target
Brian Fraser [Thu, 16 Jan 2014 10:20:28 +0000 (07:20 -0300)]
Configure, Makefile.SH: Allow running generate_uudmap in the target

This is a bit of a step backwards, but we want to run this in
the target platform when cross-compiling to some unusual setups,
like ASCII -> EBCDIC.

What this branch introduces is a third "path" for generate_uudmap:

 * If we are doing a native build, just build it as usual and run it.
 * If we're cross-compiling, and either -Dhostgenerate was specified OR
   if it was left empty, which is the default case, then create
   a host generate_uudmap and run it locally
 * Finally, if are cross-compiling and were built with -Uhostgenerate,
   then build generate_uudmap for the target and run it there, bringing
   back the resulting headers.

10 years agoConfigure: Minor improvements to the building on the host miniperl
Brian Fraser [Sun, 29 Dec 2013 05:11:32 +0000 (02:11 -0300)]
Configure: Minor improvements to the building on the host miniperl

10 years agoConfigure: When cross-compiling, save the $^O of the host
Brian Fraser [Sun, 29 Dec 2013 05:10:41 +0000 (02:10 -0300)]
Configure: When cross-compiling, save the $^O of the host

10 years agoConfigure: Silence $to warnings when cross-compiling
Brian Fraser [Sat, 16 Nov 2013 00:34:19 +0000 (21:34 -0300)]
Configure: Silence $to warnings when cross-compiling

10 years agoConfigure, run-ssh: No need to use ./\$exe
Brian Fraser [Fri, 15 Nov 2013 06:28:08 +0000 (03:28 -0300)]
Configure, run-ssh: No need to use ./\$exe

Previous, if run-ssh was passed ./TEST, it would've ended up running
././TEST in the target system.  Similarly, if you passed 'uname',
it would've tried running ./uname, which would've failed
spectacularly.

This commit changes run-ssh so that it won't add the extra './';
this means that shell builtins can be run in the target system.
While this is not generally portable, it's useful in specific
situations, such as in the hints files.

10 years agoUpdate the WinCE files to the new cross model
Brian Fraser [Wed, 11 Dec 2013 05:22:13 +0000 (02:22 -0300)]
Update the WinCE files to the new cross model

10 years agoconfigpm: Remove remnants of the old cross model
Brian Fraser [Wed, 18 Dec 2013 13:28:42 +0000 (10:28 -0300)]
configpm: Remove remnants of the old cross model

10 years agoRemove old cross-compilation model
Brian Fraser [Tue, 12 Nov 2013 04:54:48 +0000 (01:54 -0300)]
Remove old cross-compilation model

10 years agomake_ext.pl: Phase out the use of Cross.pm
Brian Fraser [Wed, 13 Nov 2013 03:02:41 +0000 (00:02 -0300)]
make_ext.pl: Phase out the use of Cross.pm

In the old cross-compilation model, lib/ for the target would
end up in xlib/; What Cross.pm did back then was change @INC
around a bit to have miniperl point to xlib; Additionally, it
was used to identify cross-compilation builds, and in make_ext.pl
to detect whenever a Makefile was from the host's build.

There is no longer any need for the first, and the second is now
a simple check for $Config{usecrosscompile}, it's still
possible for the hosts' Makefiles to be there, particularly
if the host was not compiled elsewhere using -Dmksymlinks,
like in Windows when targetting WinCE.

This commit changes make_ext.pl for cross-compiling builds
to only delete Makefiles when their CC != $Config{cc}.

10 years agoMakefile.SH: Remove remnants of the old cross-compilation model
Brian Fraser [Wed, 13 Nov 2013 05:47:14 +0000 (02:47 -0300)]
Makefile.SH: Remove remnants of the old cross-compilation model

10 years agoNo xconfig.h is produced when cross-compiling, we have a normal config.h
Jess Robinson [Sat, 29 Dec 2012 21:31:05 +0000 (21:31 +0000)]
No xconfig.h is produced when cross-compiling, we have a normal config.h

10 years agoMake sure to remove the Cross/mkdir script on *clean
Jess Robinson [Mon, 29 Apr 2013 08:54:07 +0000 (09:54 +0100)]
Make sure to remove the Cross/mkdir script on *clean