This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: [PATCH] FieldHash coverity-compliant
[perl5.git] / hints / os2.sh
index d93d823..8c8ef21 100644 (file)
@@ -4,7 +4,7 @@
 # Ilya Zakharevich <ilya@math.ohio-state.edu>
 #
 # Trimmed and comments added by 
-#     Andy Dougherty  <doughera@lafcol.lafayette.edu>
+#     Andy Dougherty  <doughera@lafayette.edu>
 #     Exactly what is required beyond a standard OS/2 installation?
 #     (see in README.os2)
 
@@ -108,6 +108,18 @@ exe_ext='.exe'
 # We provide it
 i_dlfcn='define'
 
+# 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"
@@ -119,19 +131,23 @@ aout_lib_ext='.a'
 aout_ar='ar'
 aout_plibext='.a'
 aout_lddlflags="-Zdll $ld_dll_optimize"
+
+# -D__ST_MT_ERRNO__ allows a quick relink with -Zmtd to check problems
+# which may be due to linking with -Zmtd DLLs
+
 # Cannot have 32000K stack: get SYS0170  ?!
 if [ $emxcrtrev -ge 50 ]; then 
-    aout_ldflags='-Zexe -Zsmall-conv -Zstack 16000'
+    aout_ldflags='-Zexe -Zsmall-conv -Zstack 16000 -D__ST_MT_ERRNO__'
 else
-    aout_ldflags='-Zexe -Zstack 16000'
+    aout_ldflags='-Zexe -Zstack 16000 -D__ST_MT_ERRNO__'
 fi
 
 # To get into config.sh:
 aout_ldflags="$aout_ldflags"
 
 aout_d_fork='define'
-aout_ccflags="-DDOSISH -DPERL_IS_AOUT -DOS2=2 -DEMBED -I. $_defemxcrtrev"
-aout_cppflags="-DDOSISH -DPERL_IS_AOUT -DOS2=2 -DEMBED -I. $_defemxcrtrev"
+aout_ccflags="-DDOSISH -DPERL_IS_AOUT -DOS2=2 -DEMBED -I. $_defemxcrtrev -D__ST_MT_ERRNO__"
+aout_cppflags="-DDOSISH -DPERL_IS_AOUT -DOS2=2 -DEMBED -I. $_defemxcrtrev -D__ST_MT_ERRNO__"
 aout_use_clib='c'
 aout_usedl='undef'
 aout_archobjs="os2.o dl_os2.o"
@@ -169,7 +185,7 @@ else
     else
        d_fork='undef'
     fi
-    lddlflags="-Zdll -Zomf -Zmt -Zcrtdll -Zlinker /e:2 $ld_dll_optimize"
+    lddlflags="-Zdll -Zomf -Zmt -Zcrtdll -Zlinker /e:2"
     # Recursive regmatch may eat 2.5M of stack alone.
     ldflags='-Zexe -Zomf -Zmt -Zcrtdll -Zstack 32000 -Zlinker /e:2'
     if [ $emxcrtrev -ge 50 ]; then 
@@ -259,6 +275,8 @@ d_strtoll='define'
 d_strtoull='define'
 d_getprior='define'
 d_setprior='define'
+d_usleep='define'
+d_usleepproto='define'
 
 # The next two are commented. pdksh handles #!, extproc gives no path part.
 # sharpbang='extproc '
@@ -282,6 +300,15 @@ else
     fi
 fi
 
+for f in less.exe less.sh less.ksh less.cmd more.exe more.sh more.ksh more.cmd ; do
+  if test -z "$pager"; then
+    pager="`./UU/loc $f '' $pth`"
+  fi
+done
+if test -z "$pager"; then
+  pager='cmd /c more'
+fi
+
 # Apply patches if needed
 case "$0$running_c_cmd" in
   *[/\\]Configure|*[/\\]Configure.|Configure|Configure.) # Skip Configure.cmd
@@ -437,6 +464,7 @@ cp -rfu * ../../ext/OS2/
 
 # Install tests:
 
+cp -uf ../*.t ../../t/lib
 for xxx in * ; do
        if $test -d $xxx/t; then
                cp -uf $xxx/t/*.t ../../t/lib
@@ -459,3 +487,4 @@ esac
 
 # Now go back
 cd ../..
+cp os2/*.t t/lib