From: Nick Ing-Simmons Date: Tue, 5 Feb 2002 17:31:24 +0000 (+0000) Subject: Integrate mainline X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9d9f6b522dae2008a4aa198438ba564e1f80bf14;p=p5sagit%2Fp5-mst-13.2.git Integrate mainline p4raw-id: //depot/perlio@14565 --- diff --git a/ext/DynaLoader/dl_dyld.xs b/ext/DynaLoader/dl_dyld.xs index 752ac36..45ae10f 100644 --- a/ext/DynaLoader/dl_dyld.xs +++ b/ext/DynaLoader/dl_dyld.xs @@ -116,6 +116,7 @@ static char *dlopen(char *path, int mode /* mode is ignored */) // NSLinkModule will cause the run to abort on any link error's // not very friendly but the error recovery functionality is limited. handle = NSLinkModule(ofile, path, TRUE); + NSDestroyObjectFileImage(ofile); } return handle; diff --git a/ext/POSIX/t/posix.t b/ext/POSIX/t/posix.t index 49357a6..d73dae0 100644 --- a/ext/POSIX/t/posix.t +++ b/ext/POSIX/t/posix.t @@ -62,6 +62,7 @@ SKIP: { SKIP: { skip("no kill() support on Mac OS", 4) if $Is_MacOS; + print "# warning, darwin seems to loose blocked signals (failing test 10)\n" if($^O eq 'darwin'); my $mask = new POSIX::SigSet &SIGINT; my $action = new POSIX::SigAction 'main::SigHUP', $mask, 0; sigaction(&SIGHUP, $action); @@ -91,7 +92,8 @@ SKIP: { skip("_POSIX_OPEN_MAX is inaccurate on MPE", 1) if $Is_MPE; skip("_POSIX_OPEN_MAX undefined ($fds[1])", 1) unless &_POSIX_OPEN_MAX; - ok( &_POSIX_OPEN_MAX > $fds[1], '_POSIX_OPEN_MAX' ); + ok( &_POSIX_OPEN_MAX == 16 || &_POSIX_OPEN_MAX == 20, "The two allowed values according to susv2 and susv3" ); + } my $pat; diff --git a/hints/darwin.sh b/hints/darwin.sh index d5e27a5..b0c317d 100644 --- a/hints/darwin.sh +++ b/hints/darwin.sh @@ -81,6 +81,9 @@ ccflags="${ccflags} -DINT32_MIN_BROKEN -DINT64_MIN_BROKEN" # cppflags='-traditional-cpp'; # avoid Apple's cpp precompiler, better for extensions cppflags="${cppflags} -no-cpp-precomp" +# and ccflags needs them aswell since we don't use cpp directly +ccflags="${ccflags} -no-cpp-precomp" + # Shared library extension is .dylib. # Bundle extension is .bundle. @@ -133,9 +136,13 @@ case "$usethreads$useithreads$use5005threads" in *define*) cat <&4 -*** You do not have threadsafe libraries, I cannot use threads. -*** Cannot continue, aborting. +*** Warning, there might be problems with your libraries with +*** regards to threading. + EOM - exit 1 +#*** You do not have threadsafe libraries, I cannot use threads. +#*** Cannot continue, aborting. +#EOM +# exit 1 ;; esac diff --git a/lib/File/Spec/t/rel2abs2rel.t b/lib/File/Spec/t/rel2abs2rel.t index 69232d9..e824dff 100644 --- a/lib/File/Spec/t/rel2abs2rel.t +++ b/lib/File/Spec/t/rel2abs2rel.t @@ -8,6 +8,9 @@ BEGIN { @INC = '../lib'; } +use Config; +$ENV{'PATH'} = '.' . $Config{'path_sep'} . $ENV{'PATH'}; + use Test::More tests => 5; use File::Spec; diff --git a/perl.h b/perl.h index 3e640b3..856e0be 100644 --- a/perl.h +++ b/perl.h @@ -330,7 +330,7 @@ register struct op *Perl_op asm(stringify(OP_IN_REGISTER)); /* Use the reentrant APIs like localtime_r and getpwent_r */ /* Win32 has naturally threadsafe libraries, no need to use any _r variants. */ -#if defined(USE_ITHREADS) && !defined(USE_REENTRANT_API) && !defined(WIN32) +#if defined(USE_ITHREADS) && !defined(USE_REENTRANT_API) && !defined(WIN32) && !defined(__APPLE__) # define USE_REENTRANT_API #endif diff --git a/regexec.c b/regexec.c index 830488a..8bd2284 100644 --- a/regexec.c +++ b/regexec.c @@ -924,8 +924,11 @@ S_find_byclass(pTHX_ regexp * prog, regnode *c, char *s, char *strend, char *sta STRLEN skip = do_utf8 ? UTF8SKIP(s) : 1; if (reginclass(c, (U8*)s, do_utf8) || - (ANYOF_UNICODE_FOLD_SHARP_S(c, s, strend) && - (skip = 2))) { + (ANYOF_FOLD_SHARP_S(c, s, strend) && + /* The assignment of 2 is intentional: + * for the sharp s, the skip is 2. */ + (skip = SHARP_S_SKIP) + )) { if (tmp && (norun || regtry(prog, s))) goto got_it; else @@ -2439,8 +2442,8 @@ S_regmatch(pTHX_ regnode *prog) /* If we might have the case of the German sharp s * in a casefolding Unicode character class. */ - if (ANYOF_UNICODE_FOLD_SHARP_S(scan, locinput, PL_regeol)) { - locinput += 2; + if (ANYOF_FOLD_SHARP_S(scan, locinput, PL_regeol)) { + locinput += SHARP_S_SKIP; nextchr = UCHARAT(locinput); } else diff --git a/t/op/filetest.t b/t/op/filetest.t index f757c79..fcded7a 100755 --- a/t/op/filetest.t +++ b/t/op/filetest.t @@ -37,6 +37,9 @@ print "# oldeuid = $oldeuid, euid = $>\n"; if (!$Config{d_seteuid}) { print "ok 6 #skipped, no seteuid\n"; +} +elsif ($Config{config_args} =~/Dmksymlinks/) { + print "ok 6 #skipped, we cannot chmod symlinks\n"; } elsif ($bad_chmod) { print "#[$@]\nok 6 #skipped\n"; diff --git a/utf8.h b/utf8.h index c69cd86..49531a9 100644 --- a/utf8.h +++ b/utf8.h @@ -194,15 +194,28 @@ END_EXTERN_C #define UNICODE_GREEK_SMALL_LETTER_FINAL_SIGMA 0x03C2 #define UNICODE_GREEK_SMALL_LETTER_SIGMA 0x03C3 +#define EBCDIC_LATIN_SMALL_LETTER_SHARP_S 0x0059 + #define UNI_DISPLAY_ISPRINT 0x0001 #define UNI_DISPLAY_BACKSLASH 0x0002 #define UNI_DISPLAY_QQ (UNI_DISPLAY_ISPRINT|UNI_DISPLAY_BACKSLASH) #define UNI_DISPLAY_REGEX (UNI_DISPLAY_ISPRINT|UNI_DISPLAY_BACKSLASH) -#define ANYOF_UNICODE_FOLD_SHARP_S(node, input, end) \ +#ifdef EBCDIC +# define ANYOF_FOLD_SHARP_S(node, input, end) \ + (ANYOF_BITMAP_TEST(node, EBCDIC_LATIN_SMALL_LETTER_SHARP_S) && \ + (ANYOF_FLAGS(node) & ANYOF_UNICODE) && \ + (ANYOF_FLAGS(node) & ANYOF_FOLD) && \ + ((end) > (input) + 1) && \ + toLOWER((input)[0]) == 's' && \ + toLOWER((input)[1]) == 's') +#else +# define ANYOF_FOLD_SHARP_S(node, input, end) \ (ANYOF_BITMAP_TEST(node, UNICODE_LATIN_SMALL_LETTER_SHARP_S) && \ (ANYOF_FLAGS(node) & ANYOF_UNICODE) && \ (ANYOF_FLAGS(node) & ANYOF_FOLD) && \ ((end) > (input) + 1) && \ toLOWER((input)[0]) == 's' && \ toLOWER((input)[1]) == 's') +#endif +#define SHARP_S_SKIP 2