In metaconfig.git, the branch master has been updated

<http://perl5.git.perl.org/metaconfig.git/commitdiff/9532773f1118c2a7c681f313d01a268853f0de4b?hp=f815d95f53868b28cd9cdf1e741faa96f74d2827>

- Log -----------------------------------------------------------------
commit 9532773f1118c2a7c681f313d01a268853f0de4b
Author: H.Merijn Brand - Tux <[email protected]>
Date:   Tue Jul 15 15:02:03 2014 +0200

    In nonblock test do not ignore the syscall returns.
    
    Makes for less whining with warn_unused_result.
    
    Backport of 75e58adc6f06e66e295d5d82bb4e4d14a80f1ae8
    Jarkko Hietaniemi <[email protected]>  2014-06-30 03:02:47

M       U/compline/nblock_io.U

commit cd85e517589bb98122e8f3b215cc54e6ee72a20d
Author: H.Merijn Brand - Tux <[email protected]>
Date:   Tue Jul 15 14:53:14 2014 +0200

    Add -D_FORTIFY_SOURCE=2 when applicable.
    
    Added only if available (gcc 4.*) and not already there.
    
    Not already there might be explicit via ccflags, or less explicitly
    via cppsymbols: for example in OS X 10.5+ the -D_FORTIFY_SOURCE=2
    is already the default with the system cc (gcc earlier, now clang).
    
    Some Linux distros (e.g. Fedora) also have enabled it for years,
    either for all user code, or for their own builds.
    
    Backport of 1284d934d2a3f111f67da43b3004875ce4124284
    Jarkko Hietaniemi <[email protected]>  2014-06-29 00:30:13
    
    plus a bit of more consistent indenting

M       U/modified/Cppsym.U

commit 59826cd431ee9977507c0b6e578b96412ff7360e
Author: H.Merijn Brand - Tux <[email protected]>
Date:   Tue Jul 15 14:46:31 2014 +0200

    sort and fold symbols to 65 chars wide
    
    each new letter starts at a new line

M       U/modified/Cppsym.U

commit 6619a0405c57e40c3108950df663c969d3bec6ea
Author: H.Merijn Brand - Tux <[email protected]>
Date:   Tue Jul 15 14:32:56 2014 +0200

    Remove MAD.
    
    MAD = Misc Attribute Decoration; unmaintained attempt at preserving
    the Perl parse tree more faithfully so that automatic conversion to
    Perl 6 would have been easier.
    
    Backport of b5bbe64ad2ec51417ef02ac52304ed45fe37be3f
    Jarkko Hietaniemi <[email protected]>  2014-06-13 21:21:25

D       U/perl/mad.U

commit cd390975dd52f3cddf4e5b4df246e06764d49371
Author: H.Merijn Brand - Tux <[email protected]>
Date:   Tue Jul 15 14:29:23 2014 +0200

    Protect against ptrdiff_t not being available.
    
    This is primarily for pedantic builds; ptrdiff_t is now standard,
    and had already been in use in the core without guards.
    
    Backport of d0b86e2f7c43ab4fc0721d279c46624052695726
    Brian Fraser <[email protected]>  2014-05-31 01:10:20

A       U/perl/d_ptrdiff_t.U
-----------------------------------------------------------------------

Summary of changes:
 U/compline/nblock_io.U |  25 ++++++--
 U/modified/Cppsym.U    | 155 +++++++++++++++++++++++++++----------------------
 U/perl/d_ptrdiff_t.U   |  37 ++++++++++++
 U/perl/mad.U           |  69 ----------------------
 4 files changed, 141 insertions(+), 145 deletions(-)
 create mode 100644 U/perl/d_ptrdiff_t.U
 delete mode 100644 U/perl/mad.U

diff --git a/U/compline/nblock_io.U b/U/compline/nblock_io.U
index db3085e..6546ae4 100644
--- a/U/compline/nblock_io.U
+++ b/U/compline/nblock_io.U
@@ -177,9 +177,14 @@ int main()
        int pu[2];
        char buf[1];
        char string[100];
+       int ret;
 
-       pipe(pd);       /* Down: child -> parent */
-       pipe(pu);       /* Up: parent -> child */
+       ret = pipe(pd); /* Down: child -> parent */
+       if (ret != 0)
+               exit(3);
+       ret = pipe(pu); /* Up: parent -> child */
+       if (ret != 0)
+               exit(3);
        if (0 != fork()) {
                int ret;
                close(pd[1]);   /* Parent reads from pd[0] */
@@ -195,7 +200,9 @@ int main()
                if ((ret = read(pd[0], buf, 1)) > 0)    /* Nothing to read! */
                        exit(2);
                sprintf(string, "%d\n", ret);
-               write(2, string, strlen(string));
+               ret = write(2, string, strlen(string));
+               if (ret != strlen(string))
+                       exit(3);
                alarm(0);
 #ifdef EAGAIN
                if (errno == EAGAIN) {
@@ -208,19 +215,25 @@ int main()
                        printf("EWOULDBLOCK\n");
 #endif
        ok:
-               write(pu[1], buf, 1);   /* Unblocks child, tell it to close our 
pipe */
+               ret = write(pu[1], buf, 1);     /* Unblocks child, tell it to 
close our pipe */
+               if (ret != 1)
+                       exit(3);
                sleep(2);                               /* Give it time to 
close our pipe */
                alarm(5);
                ret = read(pd[0], buf, 1);      /* Should read EOF */
                alarm(0);
                sprintf(string, "%d\n", ret);
-               write(4, string, strlen(string));
+               ret = write(4, string, strlen(string));
+               if (ret != strlen(string))
+                       exit(3);
                exit(0);
        }
 
        close(pd[0]);                   /* We write to pd[1] */
        close(pu[1]);                   /* We read from pu[0] */
-       read(pu[0], buf, 1);    /* Wait for parent to signal us we may continue 
*/
+       ret = read(pu[0], buf, 1);      /* Wait for parent to signal us we may 
continue */
+       if (ret != 1)
+               exit(3);
        close(pd[1]);                   /* Pipe pd is now fully closed! */
        exit(0);                                /* Bye bye, thank you for 
playing! */
 }
diff --git a/U/modified/Cppsym.U b/U/modified/Cppsym.U
index 1cddb63..b26f173 100644
--- a/U/modified/Cppsym.U
+++ b/U/modified/Cppsym.U
@@ -83,69 +83,64 @@ $echo "Guessing which symbols your C compiler and 
preprocessor define..." >&4
 ?X: All symbols will be transformed to both all-lower and all-upper.
 ?X: Also drop any leading/trailing underscores, the scan will try all those.
 $cat <<'EOSH' > Cppsym.know
-a29k ABI64 aegis AES_SOURCE AIX AIX32 AIX370
-AIX41 AIX42 AIX43 AIX_SOURCE aixpc ALL_SOURCE
-alliant alpha am29000 AM29000 AMD64 amd64 amiga AMIGAOS AMIX
-ansi ANSI_C_SOURCE apollo ardent ARM32 atarist att386 att3b
-BeOS BIG_ENDIAN BIT_MSF bsd BSD bsd43 bsd4_2 bsd4_3 BSD4_3 bsd4_4
-BSD_4_3 BSD_4_4 BSD_NET2 BSD_TIME BSD_TYPES BSDCOMPAT bsdi
-bull c cadmus clipper CMU COFF COMPILER_VERSION
-concurrent convex cpu cray CRAY CRAYMPP ctix CX_UX
-CYGWIN DECC DGUX DGUX_SOURCE DJGPP dmert DOLPHIN DPX2 DSO
-Dynix DynixPTX ELF encore EPI EXTENSIONS FAVOR_BSD
-FILE_OFFSET_BITS FreeBSD GCC_NEW_VARARGS gcos gcx gimpel
-GLIBC GLIBC_MINOR
-GNU_SOURCE GNUC GNUC_MINOR GNU_LIBRARY GO32 gould GOULD_PN
-H3050R H3050RX hbullx20 hcx host_mips
-hp200 hp300 hp700 HP700 hp800 hp9000
-hp9000s200 hp9000s300 hp9000s400 hp9000s500
-hp9000s700 hp9000s800 hp9k8 hp_osf hppa hpux HPUX_SOURCE
-i186 i286 i386 i486 i586 i686 i8086 i80960 i860 I960
-IA64 iAPX286 ibm ibm032 ibmesa IBMR2 ibmrt ILP32 ILP64
-INLINE_INTRINSICS INTRINSICS INT64 interdata is68k ksr1
-LANGUAGE_C LARGE_FILE_API LARGEFILE64_SOURCE
-LARGEFILE_SOURCE LFS64_LARGEFILE LFS_LARGEFILE
-LIBCATAMOUNT Linux LITTLE_ENDIAN LONG64 LONG_DOUBLE LONG_LONG
-LONGDOUBLE LONGLONG LP64 luna luna88k Lynx
-M68000 m68k m88100 m88k M88KBCS_TARGET M_COFF
-M_I186 M_I286 M_I386 M_I8086 M_I86 M_I86SM M_SYS3
-M_SYS5 M_SYSIII M_SYSV M_UNIX M_XENIX MACH machine MachTen
-MATH_HAS_NO_SIDE_EFFECTS
-mc300 mc500 mc68000 mc68010 mc68020 mc68030 mc68040
-mc68060 mc68k mc68k32 mc700 mc88000 mc88100 merlin
-mert MiNT mips MIPS_FPSET MIPS_ISA MIPS_SIM MIPS_SZINT
-MIPS_SZLONG MIPS_SZPTR MIPSEB MIPSEL MODERN_C motorola
-mpeix MSDOS MTXINU MULTIMAX mvs MVS n16 ncl_el ncl_mr
-NetBSD news1500 news1700 news1800 news1900 news3700
-news700 news800 news900 NeXT NLS nonstopux ns16000 ns32000
-ns32016 ns32332 ns32k nsc32000
+a29k ABI64 aegis AES_SOURCE AIX AIX32 AIX370 AIX41 AIX42 AIX43
+aixpc AIX_SOURCE alliant ALL_SOURCE alpha AM29000 am29000 AMD64
+amd64 amiga AMIGAOS AMIX ansi ANSI_C_SOURCE apollo ardent ARM32
+atarist att386 att3b
+BeOS BIG_ENDIAN BIT_MSF BSD bsd bsd43 bsd4_2 BSD4_3 bsd4_3 bsd4_4
+BSDCOMPAT bsdi BSD_4_3 BSD_4_4 BSD_NET2 BSD_TIME BSD_TYPES bull
+c cadmus clipper CMU COFF COMPILER_VERSION concurrent convex cpu
+CRAY cray CRAYMPP ctix CX_UX CYGWIN
+DECC DGUX DGUX_SOURCE DJGPP dmert DOLPHIN DPX2 DSO Dynix DynixPTX
+ELF encore EPI EXTENSIONS
+FAVOR_BSD FILE_OFFSET_BITS FORTIFY_SOURCE FreeBSD
+GCC_NEW_VARARGS gcos gcx gimpel GLIBC GLIBC_MINOR GNUC GNUC_MINOR
+GNU_LIBRARY GNU_SOURCE GO32 gould GOULD_PN
+H3050R H3050RX hbullx20 hcx host_mips hp200 hp300 HP700 hp700
+hp800 hp9000 hp9000s200 hp9000s300 hp9000s400 hp9000s500
+hp9000s700 hp9000s800 hp9k8 hppa hpux HPUX_SOURCE hp_osf
+i186 i286 i386 i486 i586 i686 i8086 i80960 i860 I960 IA64 iAPX286
+ibm ibm032 ibmesa IBMR2 ibmrt ILP32 ILP64 INLINE_INTRINSICS INT64
+interdata INTRINSICS is68k
+ksr1
+LANGUAGE_C LARGEFILE64_SOURCE LARGEFILE_SOURCE LARGE_FILE_API
+LFS64_LARGEFILE LFS_LARGEFILE LIBCATAMOUNT Linux LITTLE_ENDIAN
+LONG64 LONGDOUBLE LONGLONG LONG_DOUBLE LONG_LONG LP64 luna
+luna88k Lynx
+M68000 m68k m88100 m88k M88KBCS_TARGET MACH machine MachTen
+MATH_HAS_NO_SIDE_EFFECTS mc300 mc500 mc68000 mc68010 mc68020
+mc68030 mc68040 mc68060 mc68k mc68k32 mc700 mc88000 mc88100
+merlin mert MiNT mips MIPSEB MIPSEL MIPS_FPSET MIPS_ISA MIPS_SIM
+MIPS_SZINT MIPS_SZLONG MIPS_SZPTR MODERN_C motorola mpeix MSDOS
+MTXINU MULTIMAX MVS mvs M_COFF M_I186 M_I286 M_I386 M_I8086 M_I86
+M_I86SM M_SYS3 M_SYS5 M_SYSIII M_SYSV M_UNIX M_XENIX
+n16 ncl_el ncl_mr NetBSD news1500 news1700 news1800 news1900
+news3700 news700 news800 news900 NeXT NLS nonstopux ns16000
+ns32000 ns32016 ns32332 ns32k nsc32000
 OCS88 OEMVS OpenBSD os OS2 OS390 osf OSF1 OSF_SOURCE
-pa_risc PA_RISC1_1 PA_RISC2_0 PARAGON parisc
-pc532 pdp11 PGC PIC plexus PORTAR posix
-POSIX1B_SOURCE POSIX2_SOURCE POSIX4_SOURCE
-POSIX_C_SOURCE POSIX_SOURCE POWER
-PROTOTYPES PWB pyr QNX QK_USER R3000 REENTRANT RES Rhapsody RISC6000
-riscix riscos RT S390 SA110 scs SCO sequent sgi SGI_SOURCE SH3 sinix
-SIZE_INT SIZE_LONG SIZE_PTR SOCKET_SOURCE SOCKETS_SOURCE
-sony sony_news sonyrisc sparc sparclite spectrum
-stardent stdc STDC_EXT stratos sun sun3 sun386
-Sun386i svr3 svr4 SVR4_2 SVR4_SOURCE svr5
-SX system SYSTYPE_BSD SYSTYPE_BSD43 SYSTYPE_BSD44
-SYSTYPE_SVR4 SYSTYPE_SVR5 SYSTYPE_SYSV SYSV SYSV3 SYSV4 SYSV5
-sysV68 sysV88 Tek4132 Tek4300 titan
-TM3200 TM5400 TM5600
-tower tower32 tower32_200 tower32_600 tower32_700
-tower32_800 tower32_850 tss
-u370 u3b u3b2 u3b20 u3b200 u3b20d u3b5
-ultrix UMAXV UnicomPBB UnicomPBD UNICOS UNICOSMK
-unix UNIX95 UNIX99 unixpc unos
-USE_BSD USE_FILE_OFFSET64 USE_GNU USE_ISOC9X USE_LARGEFILE USE_LARGEFILE64
-USE_MISC USE_POSIX USE_POSIX199309 USE_POSIX199506 USE_POSIX2
-USE_REENTRANT USE_SVID USE_UNIX98 USE_XOPEN USE_XOPEN_EXTENDED
-USGr4 USGr4_2
-Utek UTek UTS UWIN uxpm uxps vax venix VMESA vms x86_64 xenix Xenix286
-XOPEN_SOURCE XOPEN_SOURCE_EXTENDED XPG2 XPG2_EXTENDED
-XPG3 XPG3_EXTENDED XPG4 XPG4_EXTENDED
+PARAGON parisc pa_risc PA_RISC1_1 PA_RISC2_0 pc532 pdp11 PGC PIC
+plexus PORTAR posix POSIX1B_SOURCE POSIX2_SOURCE POSIX4_SOURCE
+POSIX_C_SOURCE POSIX_SOURCE POWER PROTOTYPES PWB pyr
+QK_USER QNX
+R3000 REENTRANT RES Rhapsody RISC6000 riscix riscos RT
+S390 SA110 SCO scs sequent sgi SGI_SOURCE SH3 sinix SIZE_INT
+SIZE_LONG SIZE_PTR SOCKETS_SOURCE SOCKET_SOURCE sony sonyrisc
+sony_news sparc sparclite spectrum stardent stdc STDC_EXT stratos
+sun sun3 sun386 Sun386i svr3 svr4 SVR4_2 SVR4_SOURCE svr5 SX
+system SYSTYPE_BSD SYSTYPE_BSD43 SYSTYPE_BSD44 SYSTYPE_SVR4
+SYSTYPE_SVR5 SYSTYPE_SYSV SYSV SYSV3 SYSV4 SYSV5 sysV68 sysV88
+Tek4132 Tek4300 titan TM3200 TM5400 TM5600 tower tower32
+tower32_200 tower32_600 tower32_700 tower32_800 tower32_850 tss
+u370 u3b u3b2 u3b20 u3b200 u3b20d u3b5 ultrix UMAXV UnicomPBB
+UnicomPBD UNICOS UNICOSMK unix UNIX95 UNIX99 unixpc unos USE_BSD
+USE_FILE_OFFSET64 USE_GNU USE_ISOC9X USE_LARGEFILE
+USE_LARGEFILE64 USE_MISC USE_POSIX USE_POSIX199309
+USE_POSIX199506 USE_POSIX2 USE_REENTRANT USE_SVID USE_UNIX98
+USE_XOPEN USE_XOPEN_EXTENDED USGr4 USGr4_2 UTek Utek UTS UWIN
+uxpm uxps
+vax venix VMESA vms
+x86_64 xenix Xenix286 XOPEN_SOURCE XOPEN_SOURCE_EXTENDED XPG2
+XPG2_EXTENDED XPG3 XPG3_EXTENDED XPG4 XPG4_EXTENDED
 z8000
 EOSH
 # Maybe put other stuff here too.
@@ -162,8 +157,8 @@ $startsh
 if $test \$# -gt 0; then
     echo \$* | $tr " " "$trnl" | ./Cppsym.try > Cppsym.got
     if $test -s Cppsym.got; then
-        $rm -f Cppsym.got
-        exit 0
+       $rm -f Cppsym.got
+       exit 0
     fi
     $rm -f Cppsym.got
     exit 1
@@ -260,9 +255,9 @@ $eunicefix ccsym
 ?X: AIX complains if $uniq is passed an empty file.  ($sort apparently
 ?X: doesn't care.)  --AD  14 July 1998
 if $test -s ccsym1.raw; then
-       $sort ccsym1.raw | $uniq >ccsym.raw
+    $sort ccsym1.raw | $uniq >ccsym.raw
 else
-       mv ccsym1.raw ccsym.raw
+    mv ccsym1.raw ccsym.raw
 fi
 
 ?X: canonicalize symbols for easier sort/uniq/comm usage: append =1 if no = 
sign
@@ -278,9 +273,9 @@ if $test -z ccsym.raw; then
        echo " "
        echo "However, your C preprocessor defines the following symbols:"
        $cat Cppsym.true
-       ccsymbols=''
+       ccsymbols=''
        cppsymbols=`$cat Cppsym.true`
-        cppsymbols=`echo $cppsymbols`
+       cppsymbols=`echo $cppsymbols`
        cppccsymbols="$cppsymbols"
 else
        if $test -s ccsym.com; then
@@ -306,9 +301,29 @@ else
                echo "Your C compiler ${also}defines the following cpp symbols:"
                $sed -e 's/\(..*\)=1/\1/' ccsym.own
                $sed -e 's/\(..*\)=.*/\1/' ccsym.own | $uniq >>Cppsym.true
-               ccsymbols=`$cat ccsym.own`
-               ccsymbols=`echo $ccsymbols`
+               ccsymbols=`$cat ccsym.own`
+               ccsymbols=`echo $ccsymbols`
                $test "$silent" || sleep 1
        fi
 fi
 
+: add -D_FORTIFY_SOURCE if feasible and not already there
+case "$gccversion" in
+4.*)   case "$optimize$ccflags" in
+       *-O*)   case "$ccflags$cppsymbols" in
+               *_FORTIFY_SOURCE=*) # Don't add it again.
+                       echo "You seem to have -D_FORTIFY_SOURCE already, not 
adding it." >&4
+                       ;;
+               *)      echo "Adding -D_FORTIFY_SOURCE=2 to ccflags..." >&4
+                       ccflags="$ccflags -D_FORTIFY_SOURCE=2"
+                       ;;
+               esac
+               ;;
+       *)      echo "You have gcc 4.* but not optimizing, not adding 
-D_FORTIFY_SOURCE." >&4
+               ;;
+       esac
+       ;;
+*)     echo "You seem not to have gcc 4.*, not adding -D_FORTIFY_SOURCE." >&4
+       ;;
+esac
+
diff --git a/U/perl/d_ptrdiff_t.U b/U/perl/d_ptrdiff_t.U
new file mode 100644
index 0000000..4f230e8
--- /dev/null
+++ b/U/perl/d_ptrdiff_t.U
@@ -0,0 +1,37 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2014 H.Merijn Brand
+?RCS:
+?RCS: You may distribute under the terms of either the GNU General Public
+?RCS: License or the Artistic License, as specified in the README file.
+?RCS:
+?MAKE:d_ptrdiff_t: Inlibc Setvar Compile rm_try cat
+?MAKE: -pick add $@ %<
+?S:d_ptrdiff_t:
+?S:    This symbol will be defined if the C compiler supports ptrdiff_t.
+?S:.
+?C:HAS_PTRDIFF_T:
+?C:    This symbol will be defined if the C compiler supports ptrdiff_t.
+?C:.
+?H:#$d_ptrdiff_t       HAS_PTRDIFF_T                   /**/
+?H:.
+?LINT:set d_ptrdiff_t
+: check for ptrdiff_t
+echo " "
+echo "Checking to see if you have ptrdiff_t..." >&4
+$cat >try.c <<EOCP
+#include <stddef.h>
+int main() { ptrdiff_t x = 7; }
+EOCP
+set try
+if eval $compile; then
+       val="$define"
+       echo "You have ptrdiff_t."
+else
+       val="$undef"
+       echo "You do not have ptrdiff_t."
+fi
+$rm_try
+set d_ptrdiff_t
+eval $setvar
+
diff --git a/U/perl/mad.U b/U/perl/mad.U
deleted file mode 100644
index 949ad3b..0000000
--- a/U/perl/mad.U
+++ /dev/null
@@ -1,69 +0,0 @@
-?RCS: $Id: mad.U,v $
-?RCS:
-?RCS: Copyright (c) 2006 H.Merijn Brand, Nicholas Clark
-?RCS:
-?RCS: You may distribute under the terms of either the GNU General Public
-?RCS: License or the Artistic License, as specified in the README file.
-?RCS:
-?RCS: $Log: mad.U,v $
-?RCS:
-?MAKE:mad madlyh madlyobj madlysrc: Myread Setvar _o test patchlevel
-?MAKE: -pick add $@ %<
-?S:mad:
-?S:    This variable indicates that the Misc Attribute Definition code is to
-?S:    be compiled.
-?S:.
-?S:madlyh:
-?S:    If the Misc Attribute Decoration is to be compiled, this variable is
-?S:    set to the name of the extra header files to be used, else it is ''
-?S:.
-?S:madlyobj:
-?S:    If the Misc Attribute Decoration is to be compiled, this variable is
-?S:    set to the name of the extra object files to be used, else it is ''
-?S:.
-?S:madlysrc:
-?S:    If the Misc Attribute Decoration is to be compiled, this variable is
-?S:    set to the name of the extra C source files to be used, else it is ''
-?S:.
-?C:PERL_MAD:
-?C:    This symbol, if defined, indicates that the Misc Attribution
-?C:    Declaration code should be conditionally compiled.
-?C:.
-?H:#$mad       PERL_MAD                /**/
-?H:.
-?T:ans
-?LINT:set mad
-: MAD = Misc Attribute Definition
-
-if $test $patchlevel -lt 9; then
-: MAD is not available in 5.8.x or earlier.
-    ans=n;
-else
-    case "$mad" in
-    $define|true|[yY]*)        dflt='y' ;;
-    *)                 dflt='n' ;;
-    esac
-    cat <<EOM
-
-Would you like to build with Misc Attribute Decoration? This is development
-work leading to a Perl 5 to Perl 6 convertor, which imposes a space and speed
-overhead on the interpreter.
-
-If this doesn't make any sense to you, just accept the default '$dflt'.
-EOM
-    rp='Build Perl with MAD?'
-    . ./myread
-fi
-case "$ans" in
-y|Y)   val="$define"
-       madlyh='madly.h madly.act madly.tab'
-       madlysrc='madly.c'
-       madlyobj="madly$_o" ;;
-*)     val="$undef"
-       madlyh=''
-       madlysrc=''
-       madlyobj='' ;;
-esac
-set mad
-eval $setvar
-

--
perl5 metaconfig repository

Reply via email to