Change 14786 by jhi@alpha on 2002/02/20 14:56:55

        Subject: d_Gconvert hints and Glossary
        From: [EMAIL PROTECTED] (Yitzchak Scott-Thoennes)
        Date: Tue, 19 Feb 2002 11:55:36 -0800
        Message-ID: <[EMAIL PROTECTED]> 

Affected files ...

.... //depot/perl/Configure#410 edit
.... //depot/perl/config_h.SH#241 edit
.... //depot/perl/configpm#31 edit
.... //depot/perl/hints/aix.sh#73 edit
.... //depot/perl/hints/dec_osf.sh#39 edit
.... //depot/perl/hints/newsos4.sh#6 edit
.... //depot/perl/hints/os2.sh#36 edit
.... //depot/perl/hints/os390.sh#22 edit
.... //depot/perl/hints/svr4.sh#16 edit
.... //depot/perl/hints/svr5.sh#6 edit

Differences ...

==== //depot/perl/Configure#410 (xtext) ====
Index: perl/Configure
--- perl/Configure.~1~  Wed Feb 20 08:00:05 2002
+++ perl/Configure      Wed Feb 20 08:00:05 2002
@@ -20,7 +20,7 @@
 
 # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
 #
-# Generated on Wed Feb 20 17:35:55 EET 2002 [metaconfig 3.0 PL70]
+# Generated on Wed Feb 20 17:53:32 EET 2002 [metaconfig 3.0 PL70]
 # (with additional metaconfig patches by [EMAIL PROTECTED])
 
 cat >c1$$ <<EOF

==== //depot/perl/config_h.SH#241 (text) ====
Index: perl/config_h.SH
--- perl/config_h.SH.~1~        Wed Feb 20 08:00:05 2002
+++ perl/config_h.SH    Wed Feb 20 08:00:05 2002
@@ -1410,7 +1410,7 @@
  *     a macro using sprintf("%g") is used. Arguments for the Gconvert
  *     macro are: value, number of digits, whether trailing zeros should
  *     be retained, and the output buffer.
- *     Possible values are:
+ *     The usual values are:
  *             d_Gconvert='gconvert((x),(n),(t),(b))'
  *             d_Gconvert='gcvt((x),(n),(b))'
  *             d_Gconvert='sprintf((b),"%.*g",(n),(x))'

==== //depot/perl/configpm#31 (xtext) ====
Index: perl/configpm
--- perl/configpm.~1~   Wed Feb 20 08:00:05 2002
+++ perl/configpm       Wed Feb 20 08:00:05 2002
@@ -420,20 +420,25 @@
 $/ = '';
 
 sub process {
-  s/\A(\w*)\s+\(([\w.]+)\):\s*\n(\t?)/=item C<$1>\n\nFrom F<$2>:\n\n/m;
-  my $c = substr $1, 0, 1;
-  unless ($seen{$c}++) {
-    print CONFIG <<EOF if $text;
+  if (s/\A(\w*)\s+\(([\w.]+)\):\s*\n(\t?)/=item C<$1>\n\nFrom F<$2>:\n\n/m) {
+    my $c = substr $1, 0, 1;
+    unless ($seen{$c}++) {
+      print CONFIG <<EOF if $text;
 =back
 
 EOF
-    print CONFIG <<EOF;
+      print CONFIG <<EOF;
 =head2 $c
 
 =over 4
 
 EOF
-    $text = 1;
+     $text = 1;
+    }
+  }
+  elsif (!$text || !/\A\t/) {
+    warn "Expected a Configure variable header",
+      ($text ? " or another paragraph of description" : () );
   }
   s/n't/n\00t/g;               # leave can't, won't etc untouched
   s/^\t\s+(.*)/\n\t$1\n/gm;    # Indented lines ===> paragraphs

==== //depot/perl/hints/aix.sh#73 (text) ====
Index: perl/hints/aix.sh
--- perl/hints/aix.sh.~1~       Wed Feb 20 08:00:05 2002
+++ perl/hints/aix.sh   Wed Feb 20 08:00:05 2002
@@ -475,18 +475,6 @@
 esac
 EOCBU
 
-cat > UU/uselongdouble.cbu <<'EOCBU'
-# This script UU/uselongdouble.cbu will get 'called-back' by Configure 
-# after it has prompted the user for whether to use long doubles.
-case "$uselongdouble" in
-$define|true|[yY]*)
-        # -qlongdouble for cc taken out on 20010522 cause it
-        # causes more trouble than it does any good --hmb
-        d_Gconvert='sprintf((b),"%.*llg",((int)(n)),(x))'
-       ;;
-esac
-EOCBU
-
 if test $usenativedlopen = 'true'
 then
     ccflags="$ccflags -DUSE_NATIVE_DLOPEN"

==== //depot/perl/hints/dec_osf.sh#39 (text) ====
Index: perl/hints/dec_osf.sh
--- perl/hints/dec_osf.sh.~1~   Wed Feb 20 08:00:05 2002
+++ perl/hints/dec_osf.sh       Wed Feb 20 08:00:05 2002
@@ -305,7 +305,6 @@
                exit 1
                ;;
        esac
-       d_Gconvert='sprintf((b),"%.*Lg",(n),(x))'
        ;;
 esac
 EOCBU

==== //depot/perl/hints/newsos4.sh#6 (text) ====
Index: perl/hints/newsos4.sh
--- perl/hints/newsos4.sh.~1~   Wed Feb 20 08:00:05 2002
+++ perl/hints/newsos4.sh       Wed Feb 20 08:00:05 2002
@@ -28,6 +28,6 @@
 # filemode type is int (not mode_t)
 modetype='int'
 # using sprintf(3) instead of gcvt(3)
-d_Gconvert='sprintf((b),"%.*g",(n),(x))'
+gconvert_preference=sprintf
 # No POSIX.
 useposix='false'

==== //depot/perl/hints/os2.sh#36 (text) ====
Index: perl/hints/os2.sh
--- perl/hints/os2.sh.~1~       Wed Feb 20 08:00:05 2002
+++ perl/hints/os2.sh   Wed Feb 20 08:00:05 2002
@@ -111,6 +111,15 @@
 # The default one uses exponential notation between 0.0001 and 0.1
 d_Gconvert='gcvt_os2((x),(n),(b))'
 
+cat > UU/uselongdouble.cbu <<'EOCBU'
+# This script UU/uselongdouble.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use long doubles.
+# If we will use them, let Configure choose us a Gconvert.
+case "$uselongdouble:$d_longdbl:$d_sqrtl:$d_modfl" in
+"$define:$define:$define:$define") d_Gconvert='' ;;
+esac
+EOCBU
+
 # -Zomf build has a problem with _exit() *flushing*, so the test
 # gets confused:
 fflushNULL="define"

==== //depot/perl/hints/os390.sh#22 (text) ====
Index: perl/hints/os390.sh
--- perl/hints/os390.sh.~1~     Wed Feb 20 08:00:05 2002
+++ perl/hints/os390.sh Wed Feb 20 08:00:05 2002
@@ -208,7 +208,7 @@
 # a trivial Perl demonstration snippet is 'print 0.1'.
 # The -W 0,float(ieee) seems to be the switch breaking gcvt().
 # sprintf() seems to get things right(er).
-d_Gconvert='sprintf((b),"%.*g",(n),(x))'
+gconvert_preference=sprintf
 
 cat >config.arch<<'__CONFIG_ARCH__'
 # The '-W 0,float(ieee)' cannot be used during Configure as ldflags.

==== //depot/perl/hints/svr4.sh#16 (text) ====
Index: perl/hints/svr4.sh
--- perl/hints/svr4.sh.~1~      Wed Feb 20 08:00:05 2002
+++ perl/hints/svr4.sh  Wed Feb 20 08:00:05 2002
@@ -23,7 +23,7 @@
 #   it is needed for ODBM_File and NDBM_File extensions.
 
 if [ -r /usr/ucblib/libucb.a ]; then   # If using BSD-compat. library:
-    d_Gconvert='gcvt((x),(n),(b))'     # Try gcvt() before gconvert().
+    gconvert_preference='gcvt sprintf' # Try gcvt() before gconvert().
     # Use the "native" counterparts, not the BSD emulation stuff:
     d_bcmp='undef' d_bcopy='undef' d_bzero='undef' d_safebcpy='undef'
     d_index='undef' d_killpg='undef' d_getprior='undef' d_setprior='undef'

==== //depot/perl/hints/svr5.sh#6 (text) ====
Index: perl/hints/svr5.sh
--- perl/hints/svr5.sh.~1~      Wed Feb 20 08:00:05 2002
+++ perl/hints/svr5.sh  Wed Feb 20 08:00:05 2002
@@ -87,7 +87,7 @@
 
 # Don't use BSD emulation pieces (/usr/ucblib) regardless
 # these would probably be autonondetected anyway but ...
-d_Gconvert='gcvt((x),(n),(b))' # Try gcvt() before gconvert().
+gconvert_preference='gcvt sprintf'     # Try gcvt() before gconvert().
 d_bcopy='undef' d_bcmp='undef'  d_bzero='undef'  d_safebcpy='undef'
 d_index='undef' d_killpg='undef' d_getprior='undef' d_setprior='undef'
 d_setlinebuf='undef' 
End of Patch.

Reply via email to