zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: LFS
@ 2008-05-31 18:27 Clint Adams
  2008-06-01 16:20 ` Peter Stephenson
  0 siblings, 1 reply; 6+ messages in thread
From: Clint Adams @ 2008-05-31 18:27 UTC (permalink / raw)
  To: zsh-workers

Unless I'm missing something here, AC_SYS_LARGEFILE is superior.

Index: aczsh.m4
===================================================================
RCS file: /cvsroot/zsh/zsh/aczsh.m4,v
retrieving revision 1.18
diff -u -r1.18 aczsh.m4
--- aczsh.m4	17 Aug 2005 17:41:34 -0000	1.18
+++ aczsh.m4	31 May 2008 18:25:33 -0000
@@ -25,57 +25,6 @@
 dnl
 
 dnl
-dnl Code from the configure system for bash 2.03 (not zsh copyright).
-dnl If available, use support for large files unless the user specified
-dnl one of the CPPFLAGS, LDFLAGS, or LIBS variables (<eggert@twinsun.com>
-dnl via GNU patch 2.5)
-dnl
-AC_DEFUN(zsh_LARGE_FILE_SUPPORT,
-[AC_MSG_CHECKING(whether large file support needs explicit enabling)
-ac_getconfs=''
-ac_result=yes
-ac_set=''
-ac_shellvars='CPPFLAGS LDFLAGS LIBS'
-for ac_shellvar in $ac_shellvars; do
-  case $ac_shellvar in
-  CPPFLAGS) ac_lfsvar=LFS_CFLAGS ;;
-  *) ac_lfsvar=LFS_$ac_shellvar ;;
-  esac
-  (getconf $ac_lfsvar) >/dev/null 2>&1 || { ac_result=no; break; }
-  ac_getconf=`getconf $ac_lfsvar`
-  if test -n "$ac_getconf" && test "$ac_getconf" != "undefined"; then
-    eval test '"${'$ac_shellvar'+set}"' = set && ac_set=$ac_shellvar
-    ac_getconfs=$ac_getconfs$ac_getconf
-    eval ac_test_$ac_shellvar="\$ac_getconf"
-  else
-    eval ac_test_$ac_shellvar="\$$ac_shellvar"
-  fi
-done
-case "$ac_result$ac_getconfs" in
-yes) ac_result=no ;;
-esac
-case "$ac_result$ac_set" in
-yes?*) test "x$ac_set" != "xLDFLAGS" -o "x$auto_ldflags" = x && {
-  ac_result="yes, but $ac_set is already set, so use its settings"
-}
-esac
-AC_MSG_RESULT($ac_result)
-case $ac_result in
-yes)
-  for ac_shellvar in $ac_shellvars; do
-    case "`eval echo $ac_shellvar-\\\$ac_test_$ac_shellvar`" in
-      CPPFLAGS*-D_LARGEFILE_SOURCE*) eval $ac_shellvar=\$ac_test_$ac_shellvar
-	;;
-      CPPFLAGS*) 
-        eval $ac_shellvar="\"-D_LARGEFILE_SOURCE \$ac_test_$ac_shellvar\""
-	;;
-      *) eval $ac_shellvar=\$ac_test_$ac_shellvar
-    esac
-  done ;;
-esac
-])
-
-dnl
 dnl zsh_64_BIT_TYPE
 dnl   Check whether the first argument works as a 64-bit type.
 dnl   If there is a non-zero third argument, we just assume it works
Index: configure.ac
===================================================================
RCS file: /cvsroot/zsh/zsh/configure.ac,v
retrieving revision 1.103
diff -u -r1.103 configure.ac
--- configure.ac	6 May 2008 11:57:43 -0000	1.103
+++ configure.ac	31 May 2008 18:25:34 -0000
@@ -375,7 +375,7 @@
   if test "$host" = mips-sni-sysv4 && test -n "$GCC"; then
     : 
   else
-    zsh_LARGE_FILE_SUPPORT
+    AC_SYS_LARGEFILE
   fi
 fi
 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: PATCH: LFS
  2008-05-31 18:27 PATCH: LFS Clint Adams
@ 2008-06-01 16:20 ` Peter Stephenson
  2008-06-01 16:36   ` Clint Adams
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Stephenson @ 2008-06-01 16:20 UTC (permalink / raw)
  To: zsh-workers

On Sat, 31 May 2008 14:27:09 -0400
Clint Adams <clint@zsh.org> wrote:
> Unless I'm missing something here, AC_SYS_LARGEFILE is superior.

In that case, references to --enable-lfs and $lfs need removing and its
use for finding a 64-bit type fixing up.

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: PATCH: LFS
  2008-06-01 16:20 ` Peter Stephenson
@ 2008-06-01 16:36   ` Clint Adams
  2008-06-01 17:19     ` Bart Schaefer
  0 siblings, 1 reply; 6+ messages in thread
From: Clint Adams @ 2008-06-01 16:36 UTC (permalink / raw)
  To: zsh-workers

On Sun, Jun 01, 2008 at 05:20:35PM +0100, Peter Stephenson wrote:
> In that case, references to --enable-lfs and $lfs need removing and its
> use for finding a 64-bit type fixing up.

This misrepresents some of the past-tense statements.

Index: INSTALL
===================================================================
RCS file: /cvsroot/zsh/zsh/INSTALL,v
retrieving revision 1.34
diff -u -r1.34 INSTALL
--- INSTALL	29 Jan 2008 17:51:01 -0000	1.34
+++ INSTALL	1 Jun 2008 16:34:07 -0000
@@ -469,21 +469,18 @@
 ------------------------------------
 
 Some 32-bit systems allow special compilation modes to get around the 2GB
-file size barrier.  This is enabled by default; use --disable-lfs to turn
+file size barrier.  This is enabled by default; use --disable-largefile to turn
 it off.  Not all systems recognize the test used by zsh (via the getconf
 command), so flags may need to be set by hand.  On HP-UX 10.20, zsh has
 been successfully compiled with large file support by configuring with
   CC="cc -Ae" CPPFLAGS="-D_LARGEFILE_SOURCE -D_FILE64" configure \
-  --enable-lfs ...
-You can also specify --enable-lfs together with a value, which will be
-interpreted as the name of a 64-bit integer type, for example
---enable-lfs="long long" (although this type is checked for anyway).
+  --enable-largefile ...
 
-Furthermore, use of --enable-lfs will also enable 64-bit arithmetic for
+Furthermore, use of --enable-largefile will also enable 64-bit arithmetic for
 shell parameters, and anywhere they are used such as in mathematical
 formulae.  This depends only on the shell finding a suitable 64-bit integer
 type; it does not require that support for large files is actually
-enabled.  Hence --enable-lfs is useful on many 32-bit systems
+enabled.  Hence --enable-largefile is useful on many 32-bit systems
 with a suitable compiler such as gcc.
 
 Also note that if `configure' finds out that either of the types off_t or
@@ -577,6 +574,6 @@
                      # [DATADIR/zsh/site-functions]
 function-subdirs     # if functions will be installed into subdirectories [no]
 dynamic              # allow dynamically loaded binary modules [yes]
-lfs                  # allow configure check for large files [yes]
+largefile            # allow configure check for large files [yes]
 locale               # allow use of locale library [yes]
 
Index: MACHINES
===================================================================
RCS file: /cvsroot/zsh/zsh/MACHINES,v
retrieving revision 1.6
diff -u -r1.6 MACHINES
--- MACHINES	27 Feb 2008 11:46:26 -0000	1.6
+++ MACHINES	1 Jun 2008 16:34:07 -0000
@@ -225,7 +225,7 @@
 	to /usr/ucblib in your LD_LIBRARY_PATH.  You can easily do this
 	by just unsetting LD_LIBRARY_PATH before building zsh.
 
-	Problems were once reported using --enable-lfs (the default) to
+	Problems were once reported using --enable-largefile (the default) to
 	enable large file system and integer support on Solaris 2 with gcc
 	before 2.95.2.  Recent versions of gcc appear to be unproblematic.
 
Index: configure.ac
===================================================================
RCS file: /cvsroot/zsh/zsh/configure.ac,v
retrieving revision 1.104
diff -u -r1.104 configure.ac
--- configure.ac	31 May 2008 18:30:54 -0000	1.104
+++ configure.ac	1 Jun 2008 16:34:08 -0000
@@ -210,12 +210,6 @@
 AC_SUBST(zlogin)dnl
 AC_SUBST(zlogout)dnl
 
-dnl Do you want large file support, if available?
-ifdef([lfs],[undefine([lfs])])dnl
-AC_ARG_ENABLE(lfs,
-AC_HELP_STRING([--disable-lfs], [turn off support for large files]),
-[lfs="$enableval"], [lfs=yes])
-
 dnl Do you want dynamically loaded binary modules.
 ifdef([dynamic],[undefine([dynamic])])dnl
 AC_ARG_ENABLE(dynamic,
@@ -367,16 +361,14 @@
 AC_PROG_CC
 
 dnl Check for large file support.
-dnl This needs to be done early to get the stuff into the flags.
-if test x$lfs != xno; then
+
 dnl Gross hack for ReliantUNIX - GCC does not understand getconf options
 dnl For now just disable LFS in this case
 dnl Any takers?
-  if test "$host" = mips-sni-sysv4 && test -n "$GCC"; then
-    : 
-  else
-    AC_SYS_LARGEFILE
-  fi
+if test "$host" = mips-sni-sysv4 && test -n "$GCC"; then
+  : 
+else
+  AC_SYS_LARGEFILE
 fi
 
 dnl if the user hasn't specified CFLAGS, then
@@ -913,26 +905,22 @@
     AC_DEFINE(INO_T_IS_64_BIT)
   fi
 
-  if test x$lfs != xno -o x$zsh_cv_off_t_is_64_bit = xyes \
+  if test x$enable_largefile != xno -o x$zsh_cv_off_t_is_64_bit = xyes \
   -o $zsh_cv_ino_t_is_64_bit = yes; then
     AC_CACHE_CHECK(if compiler has a 64 bit type, zsh_cv_64_bit_type,
-    [if test x$lfs != xyes && test x$lfs != xno; then
-      zsh_64_BIT_TYPE(${lfs}, zsh_cv_64_bit_type, force)
-     else
-       zsh_64_BIT_TYPE(long long, zsh_cv_64_bit_type)
-       if test "$zsh_cv_64_bit_type" = no; then
-         zsh_64_BIT_TYPE(quad_t, zsh_cv_64_bit_type)
-       fi
-       if test "$zsh_cv_64_bit_type" = no; then
-         zsh_64_BIT_TYPE(__int64_t, zsh_cv_64_bit_type)
-       fi
-       dnl As a last resort, if we know off_t has 64 bits, use that as
-       dnl the 64-bit integer type.  I don't dare try ino_t since there's
-       dnl probably nothing to stop that being unsigned.
-       if test "$zsh_cv_64_bit_type" = no &&
-          test "$zsh_cv_off_t_is_64_bit" = yes; then
-         zsh_64_BIT_TYPE(off_t, zsh_cv_64_bit_type)
-       fi
+    [zsh_64_BIT_TYPE(long long, zsh_cv_64_bit_type)
+     if test "$zsh_cv_64_bit_type" = no; then
+       zsh_64_BIT_TYPE(quad_t, zsh_cv_64_bit_type)
+     fi
+     if test "$zsh_cv_64_bit_type" = no; then
+       zsh_64_BIT_TYPE(__int64_t, zsh_cv_64_bit_type)
+     fi
+     dnl As a last resort, if we know off_t has 64 bits, use that as
+     dnl the 64-bit integer type.  I don't dare try ino_t since there's
+     dnl probably nothing to stop that being unsigned.
+     if test "$zsh_cv_64_bit_type" = no &&
+        test "$zsh_cv_off_t_is_64_bit" = yes; then
+       zsh_64_BIT_TYPE(off_t, zsh_cv_64_bit_type)
      fi])
     if test "$zsh_cv_64_bit_type" != no; then
       AC_DEFINE_UNQUOTED(ZSH_64_BIT_TYPE, $zsh_cv_64_bit_type)
Index: Src/zsh.h
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/zsh.h,v
retrieving revision 1.134
diff -u -r1.134 zsh.h
--- Src/zsh.h	12 May 2008 13:50:42 -0000	1.134
+++ Src/zsh.h	1 Jun 2008 16:34:10 -0000
@@ -33,7 +33,8 @@
 /*
  * Our longest integer type:  will be a 64 bit either if long already is,
  * or if we found some alternative such as long long.
- * Currently we only define this to be longer than a long if --enable-lfs
+ * Currently we only define this to be longer than a long if
+ * --enable-largefile
  * was given.  That enables internal use of 64-bit types even if
  * no actual large file support is present.
  */


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: PATCH: LFS
  2008-06-01 16:36   ` Clint Adams
@ 2008-06-01 17:19     ` Bart Schaefer
  2008-06-01 17:52       ` Clint Adams
  0 siblings, 1 reply; 6+ messages in thread
From: Bart Schaefer @ 2008-06-01 17:19 UTC (permalink / raw)
  To: zsh-workers

On Jun 1,  4:36pm, Clint Adams wrote:

} Index: INSTALL
} -file size barrier.  This is enabled by default; use --disable-lfs to turn
} +file size barrier.  This is enabled by default; use --disable-largefile to turn

} Index: Src/zsh.h
} - * Currently we only define this to be longer than a long if --enable-lfs
} + * Currently we only define this to be longer than a long if
} + * --enable-largefile

I know I'm nit-picking here, but I think it would be better to reformat
more of the paragraphs to avoid very long/very short lines, rather than
concentrate on producing the smallest possible diff.

(Why was it even necessary to change "lfs" to "largefile" in the first
place?  Force people to notice by deliberately breaking existing their
existing config.status?)


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: PATCH: LFS
  2008-06-01 17:19     ` Bart Schaefer
@ 2008-06-01 17:52       ` Clint Adams
  2008-06-01 18:20         ` Peter Stephenson
  0 siblings, 1 reply; 6+ messages in thread
From: Clint Adams @ 2008-06-01 17:52 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-workers

On Sun, Jun 01, 2008 at 10:19:54AM -0700, Bart Schaefer wrote:
> I know I'm nit-picking here, but I think it would be better to reformat
> more of the paragraphs to avoid very long/very short lines, rather than
> concentrate on producing the smallest possible diff.
> 
> (Why was it even necessary to change "lfs" to "largefile" in the first
> place?  Force people to notice by deliberately breaking existing their
> existing config.status?)

What happened was that I discovered the hard way that the previous
largefile detection support would abort if CPPFLAGS was set but null.
Rather than protecting against this case by changing a + to a :+, it
struck me as much more robust to switch to autoconf's AC_SYS_LARGEFILE;
that way it will do the right thing if CPPFLAGS is set to the null
string, and even if it is set to arbitrary flags, and theoretically
do so on more platforms than previously.

We could hack --enable-lfs back in as some kind of alias to
--enable-largefile, but I suspect that it would be flimsy and dependent
on autoconf internals.

Another option is to make zsh_LARGE_FILE_SUPPORT behave exactly as
autoconf's AC_SYS_LARGEFILE except for s/largefile/lfs/ , but that
would deprive us of automatically receiving the benefits of any
upstream AC_SYS_LARGEFILE fixes or enhancements.

Better ideas?

Index: INSTALL
===================================================================
RCS file: /cvsroot/zsh/zsh/INSTALL,v
retrieving revision 1.35
diff -u -r1.35 INSTALL
--- INSTALL	1 Jun 2008 16:39:09 -0000	1.35
+++ INSTALL	1 Jun 2008 17:40:07 -0000
@@ -469,15 +469,16 @@
 ------------------------------------
 
 Some 32-bit systems allow special compilation modes to get around the 2GB
-file size barrier.  This is enabled by default; use --disable-largefile to turn
-it off.  Not all systems recognize the test used by zsh (via the getconf
-command), so flags may need to be set by hand.  On HP-UX 10.20, zsh has
-been successfully compiled with large file support by configuring with
+file size barrier.  This is enabled by default; use --disable-largefile
+to turn it off.  Not all systems recognize the test used by zsh (via the
+getconf command), so flags may need to be set by hand.  On HP-UX 10.20,
+zsh has been successfully compiled with large file support by configuring
+with
   CC="cc -Ae" CPPFLAGS="-D_LARGEFILE_SOURCE -D_FILE64" configure \
   --enable-largefile ...
 
-Furthermore, use of --enable-largefile will also enable 64-bit arithmetic for
-shell parameters, and anywhere they are used such as in mathematical
+Furthermore, use of --enable-largefile will also enable 64-bit arithmetic
+for shell parameters, and anywhere they are used such as in mathematical
 formulae.  This depends only on the shell finding a suitable 64-bit integer
 type; it does not require that support for large files is actually
 enabled.  Hence --enable-largefile is useful on many 32-bit systems
Index: Src/zsh.h
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/zsh.h,v
retrieving revision 1.135
diff -u -r1.135 zsh.h
--- Src/zsh.h	1 Jun 2008 16:39:10 -0000	1.135
+++ Src/zsh.h	1 Jun 2008 17:40:21 -0000
@@ -34,9 +34,8 @@
  * Our longest integer type:  will be a 64 bit either if long already is,
  * or if we found some alternative such as long long.
  * Currently we only define this to be longer than a long if
- * --enable-largefile
- * was given.  That enables internal use of 64-bit types even if
- * no actual large file support is present.
+ * --enable-largefile * was given.  That enables internal use of 64-bit
+ * types even if no actual large file support is present.
  */
 #ifdef ZSH_64_BIT_TYPE
 typedef ZSH_64_BIT_TYPE zlong;


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: PATCH: LFS
  2008-06-01 17:52       ` Clint Adams
@ 2008-06-01 18:20         ` Peter Stephenson
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Stephenson @ 2008-06-01 18:20 UTC (permalink / raw)
  To: Zsh Hackers' List, zsh-workers

On Sun, 1 Jun 2008 17:52:43 +0000
Clint Adams <clint@zsh.org> wrote:
> We could hack --enable-lfs back in as some kind of alias to
> --enable-largefile, but I suspect that it would be flimsy and dependent
> on autoconf internals.

I think you're right and we might just as well bite the bullet now.
Possibly what we lose by making a few people use --disable-largefile
instead of --disable-lfs we gain by being compatible with other
autoconf-based systems.

Index: README
===================================================================
RCS file: /cvsroot/zsh/zsh/README,v
retrieving revision 1.52
diff -u -r1.52 README
--- README	2 Apr 2008 12:51:33 -0000	1.52
+++ README	1 Jun 2008 18:16:57 -0000
@@ -34,6 +34,12 @@
 
 Since 4.2:
 
+The configuration option --enable-lfs to enable large file support has
+been replaced by autoconf's standard --enable-largefile mechanism.
+As this is usually used whenever necessary, this won't usually
+be noticeable; however, anyone configuring with --disable-lfs
+should configure with --disable-largefile instead.
+
 The configuration option --with-curses-terminfo has been replaced
 by the option --with-term-lib="LIBS" where LIBS is a space-separated
 list of libraries to search for termcap and curses features.


-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-06-01 18:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-31 18:27 PATCH: LFS Clint Adams
2008-06-01 16:20 ` Peter Stephenson
2008-06-01 16:36   ` Clint Adams
2008-06-01 17:19     ` Bart Schaefer
2008-06-01 17:52       ` Clint Adams
2008-06-01 18:20         ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).