Missing variable quoting in m4 files

2006-05-21 Thread Roland Illig

Hi,

when using the ls-mntd-fs.m4 file on NetBSD 3.0/i386, I got an error 
caused by an empty variable ($ac_cv_func_getmntent):


test: =: unary operator expected

So I patched all variable uses to include the proper quotes.

Roland
Index: fsusage.m4
===
RCS file: /cvsroot/mc/mc/m4/fsusage.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- fsusage.m4  18 Mar 2006 13:17:50 -  1.1
+++ fsusage.m4  21 May 2006 09:54:11 -  1.2
@@ -22,7 +22,7 @@ AC_DEFUN([gl_FSUSAGE],
#include 
   #endif]])
   gl_FILE_SYSTEM_USAGE([gl_cv_fs_space=yes], [gl_cv_fs_space=no])
-  if test $gl_cv_fs_space = yes; then
+  if test "$gl_cv_fs_space" = yes; then
 AC_LIBOBJ(fsusage)
 gl_PREREQ_FSUSAGE_EXTRA
   fi
@@ -46,7 +46,7 @@ ac_fsusage_space=no
 # of a `struct statvfs' causes this test to fail (as it should) on such
 # systems.  That system is reported to work fine with STAT_STATFS4 which
 # is what it gets when this test fails.
-if test $ac_fsusage_space = no; then
+if test "$ac_fsusage_space" = no; then
   # SVR4
   AC_CACHE_CHECK([for statvfs function (SVR4)], fu_cv_sys_stat_statvfs,
 [AC_TRY_LINK([#include 
@@ -59,14 +59,14 @@ one of the corresponding file systems is
  [struct statvfs fsd; statvfs (0, &fsd);],
  fu_cv_sys_stat_statvfs=yes,
  fu_cv_sys_stat_statvfs=no)])
-  if test $fu_cv_sys_stat_statvfs = yes; then
+  if test "$fu_cv_sys_stat_statvfs" = yes; then
 ac_fsusage_space=yes
 AC_DEFINE(STAT_STATVFS, 1,
  [  Define if there is a function named statvfs.  (SVR4)])
   fi
 fi
 
-if test $ac_fsusage_space = no; then
+if test "$ac_fsusage_space" = no; then
   # DEC Alpha running OSF/1
   AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)])
   AC_CACHE_VAL(fu_cv_sys_stat_statfs3_osf1,
@@ -84,14 +84,14 @@ if test $ac_fsusage_space = no; then
   fu_cv_sys_stat_statfs3_osf1=no,
   fu_cv_sys_stat_statfs3_osf1=no)])
   AC_MSG_RESULT($fu_cv_sys_stat_statfs3_osf1)
-  if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
+  if test "$fu_cv_sys_stat_statfs3_osf1" = yes; then
 ac_fsusage_space=yes
 AC_DEFINE(STAT_STATFS3_OSF1, 1,
  [   Define if  statfs takes 3 args.  (DEC Alpha running OSF/1)])
   fi
 fi
 
-if test $ac_fsusage_space = no; then
+if test "$ac_fsusage_space" = no; then
 # AIX
   AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl
 member (AIX, 4.3BSD)])
@@ -116,7 +116,7 @@ member (AIX, 4.3BSD)])
   fu_cv_sys_stat_statfs2_bsize=no,
   fu_cv_sys_stat_statfs2_bsize=no)])
   AC_MSG_RESULT($fu_cv_sys_stat_statfs2_bsize)
-  if test $fu_cv_sys_stat_statfs2_bsize = yes; then
+  if test "$fu_cv_sys_stat_statfs2_bsize" = yes; then
 ac_fsusage_space=yes
 AC_DEFINE(STAT_STATFS2_BSIZE, 1,
 [  Define if statfs takes 2 args and struct statfs has a field named f_bsize.
@@ -124,7 +124,7 @@ member (AIX, 4.3BSD)])
   fi
 fi
 
-if test $ac_fsusage_space = no; then
+if test "$ac_fsusage_space" = no; then
 # SVR3
   AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)])
   AC_CACHE_VAL(fu_cv_sys_stat_statfs4,
@@ -139,14 +139,14 @@ if test $ac_fsusage_space = no; then
 fu_cv_sys_stat_statfs4=no,
 fu_cv_sys_stat_statfs4=no)])
   AC_MSG_RESULT($fu_cv_sys_stat_statfs4)
-  if test $fu_cv_sys_stat_statfs4 = yes; then
+  if test "$fu_cv_sys_stat_statfs4" = yes; then
 ac_fsusage_space=yes
 AC_DEFINE(STAT_STATFS4, 1,
  [  Define if statfs takes 4 args.  (SVR3, Dynix, Irix, Dolphin)])
   fi
 fi
 
-if test $ac_fsusage_space = no; then
+if test "$ac_fsusage_space" = no; then
 # 4.4BSD and NetBSD
   AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl
 member (4.4BSD and NetBSD)])
@@ -168,7 +168,7 @@ member (4.4BSD and NetBSD)])
   fu_cv_sys_stat_statfs2_fsize=no,
   fu_cv_sys_stat_statfs2_fsize=no)])
   AC_MSG_RESULT($fu_cv_sys_stat_statfs2_fsize)
-  if test $fu_cv_sys_stat_statfs2_fsize = yes; then
+  if test "$fu_cv_sys_stat_statfs2_fsize" = yes; then
 ac_fsusage_space=yes
 AC_DEFINE(STAT_STATFS2_FSIZE, 1,
 [  Define if statfs takes 2 args and struct statfs has a field named f_fsize.
@@ -176,7 +176,7 @@ member (4.4BSD and NetBSD)])
   fi
 fi
 
-if test $ac_fsusage_space = no; then
+if test "$ac_fsusage_space" = no; then
   # Ultrix
   AC_MSG_CHECKING([for two-argument statfs with struct fs_data (Ultrix)])
   AC_CACHE_VAL(fu_cv_sys_stat_fs_data,
@@ -201,7 +201,7 @@ if test $ac_fsusage_space = no; then
   fu_cv_sys_stat_fs_data=no,
   fu_cv_sys_stat_fs_data=no)])
   AC_MSG_RESULT($fu_cv_sys_stat_fs_data)
-  if test $fu_cv_sys_stat_fs_data = yes; then
+  if test "$fu_cv_sys_stat_fs_data" = yes; then
 ac_fsusage_space=yes
 AC_DEFINE(STAT_STATFS2_FS_DATA, 1,
 [  Define if statfs takes 2 args and the second argument has
@@ -209,7 +209,7 @@ if test $ac_fsusage_space = no; then
   fi
 fi
 
-if test $ac_fsusage_spac

coreutils 5.95 on IRIX 5.3

2006-05-21 Thread Georg Schwarz

Dear developers,

coreutils 5.95, unlike prior releases, seems to build relatively fine  
on IRIX 5.3.


There are at leasr two issues however:

- configure does not find /sbin/grep; settting GREP environment  
variable works around this.

- IRIX 5.3's sed does not like some syntax used by config.status:


lorenz 133% ./config.status config.h
config.status: creating config.h
sed: command garbled: s,^\([ ]*#[]*\)[^  ]*\([   ][  ] 
*_UINT32_T\)[  (].*$,\1define\2 1 ,
sed: command garbled: s,^\([ ]*#[]*\)[^  ]*\([   ][  ] 
*GETLOADAVG_PRIVILEGED\)[  (].*$,\1define\2 1 ,
sed: command garbled: s,^\([ ]*#[]*\)[^  ]*\([   ][  ] 
*re_search_2\)[(].*$,\1define\2 rpl_re_search_2 ,

config.status: config.h is unchanged

Using gnu sed instead works around this. There does not seem to be  
support for the SED variable in the configure scripts though, which  
would be helpful.




Finally, here's the output of make check:

lorenz 151% /usr/local/pkg/bin/gmake check
Making check in lib
gmake[1]: Entering directory `/var/tmp/coreutils-5.95/lib'
./t-fpending > /dev/null
/usr/local/pkg/bin/gmake  check-am
gmake[2]: Entering directory `/var/tmp/coreutils-5.95/lib'
gmake[2]: Nothing to be done for `check-am'.
gmake[2]: Leaving directory `/var/tmp/coreutils-5.95/lib'
gmake[1]: Leaving directory `/var/tmp/coreutils-5.95/lib'
Making check in src
gmake[1]: Entering directory `/var/tmp/coreutils-5.95/src'
rm -rf progs-readme progs-makefile
echo [ chgrp chown chmod cp dd dircolors du ginstall link ln dir vdir  
ls mkdir mkfifo mknod mv nohup readlink rm rmdir shred stat sync  
touch unlink cat cksum comm csplit cut expand fmt fold head join  
md5sum nl od paste pr ptx sha1sum sort split sum tac tail tr tsort  
unexpand uniq wc basename date dirname echo env expr factor false  
hostname id kill logname pathchk printenv printf pwd seq sleep tee  
test true tty whoami yes uname chroot hostid nice pinky users who  
uptime stty df groups chroot df hostid nice pinky stty su uname  
uptime users who \

 | tr -s ' ' '\n' | sed -e 's,$,,' \
 | LC_ALL=C sort -u > progs-makefile && \
sed -n '/^The programs .* are:/,/^[a-zA-Z]/p' ../README \
  | sed -n '/^   */s///p' | tr -s ' ' '\n' > progs-readme
diff progs-makefile progs-readme && rm -rf progs-readme progs-makefile
cd .; grep '^# *define  *S_IS' lbracket.c basename.c cat.c chgrp.c  
chown-core.c chmod.c chown.c chown-core.c chroot.c cksum.c comm.c  
cp.c copy.c cp-hash.c csplit.c cut.c date.c dd.c df.c ls.c ls-dir.c  
dircolors.c dirname.c du.c echo.c env.c expand.c expr.c factor.c  
false.c fmt.c fold.c install.c copy.c cp-hash.c head.c hostid.c  
hostname.c id.c join.c kill.c link.c ln.c logname.c ls.c ls-ls.c  
md5sum.c md5.c mkdir.c mkfifo.c mknod.c mv.c copy.c cp-hash.c  
remove.c nice.c nl.c nohup.c od.c paste.c pathchk.c pinky.c pr.c  
printenv.c printf.c ptx.c pwd.c readlink.c rm.c remove.c rmdir.c  
seq.c setuidgid.c md5sum.c sha1sum.c shred.c sleep.c sort.c split.c  
stat.c stty.c su.c sum.c sync.c tac.c tail.c tee.c test.c touch.c  
tr.c true.c tsort.c tty.c uname.c unexpand.c uniq.c unlink.c uptime.c  
users.c ls.c ls-vdir.c wc.c who.c whoami.c yes.c && exit 1 || :
cd .; grep st_blocks lbracket.c basename.c cat.c chgrp.c chown-core.c  
chmod.c chown.c chown-core.c chroot.c cksum.c comm.c cp.c copy.c cp- 
hash.c csplit.c cut.c date.c dd.c df.c ls.c ls-dir.c dircolors.c  
dirname.c du.c echo.c env.c expand.c expr.c factor.c false.c fmt.c  
fold.c install.c copy.c cp-hash.c head.c hostid.c hostname.c id.c  
join.c kill.c link.c ln.c logname.c ls.c ls-ls.c md5sum.c md5.c  
mkdir.c mkfifo.c mknod.c mv.c copy.c cp-hash.c remove.c nice.c nl.c  
nohup.c od.c paste.c pathchk.c pinky.c pr.c printenv.c printf.c ptx.c  
pwd.c readlink.c rm.c remove.c rmdir.c seq.c setuidgid.c md5sum.c  
sha1sum.c shred.c sleep.c sort.c split.c stat.c stty.c su.c sum.c  
sync.c tac.c tail.c tee.c test.c touch.c tr.c true.c tsort.c tty.c  
uname.c unexpand.c uniq.c unlink.c uptime.c users.c ls.c ls-vdir.c  
wc.c who.c whoami.c yes.c && exit 1 || :
cd .; grep '^# *define .*defined' lbracket.c basename.c cat.c chgrp.c  
chown-core.c chmod.c chown.c chown-core.c chroot.c cksum.c comm.c  
cp.c copy.c cp-hash.c csplit.c cut.c date.c dd.c df.c ls.c ls-dir.c  
dircolors.c dirname.c du.c echo.c env.c expand.c expr.c factor.c  
false.c fmt.c fold.c install.c copy.c cp-hash.c head.c hostid.c  
hostname.c id.c join.c kill.c link.c ln.c logname.c ls.c ls-ls.c  
md5sum.c md5.c mkdir.c mkfifo.c mknod.c mv.c copy.c cp-hash.c  
remove.c nice.c nl.c nohup.c od.c paste.c pathchk.c pinky.c pr.c  
printenv.c printf.c ptx.c pwd.c readlink.c rm.c remove.c rmdir.c  
seq.c setuidgid.c md5sum.c sha1sum.c shred.c sleep.c sort.c split.c  
stat.c stty.c su.c sum.c sync.c tac.c tail.c tee.c test.c touch.c  
tr.c true.c tsort.c tty.c uname.c unexpand.c uniq.c unlink.c uptime.c  
users.c ls.c ls-vdir.c wc.c who.c whoami.c yes.c && exit 1 || :

rm -f authors-ac

expr --> problem with product functionality

2006-05-21 Thread Matthias Wall
Hallo,

i use  expr (GNU corutils) 5.3.0
Written by Mike Parker.

comming with Suse Linux 10.0   64 Bit Version.


I have the problem, that the arithmetic function product is not working.

For example:

Linux_box:/ # expr 10 / 2
5
Linux_box:/ # expr 10 * 2
expr: syntax error


Best regards 


-- 

MfG

Matthias Wall
___
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192



___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: expr --> problem with product functionality

2006-05-21 Thread Alfred M. Szmidt
   GNU/Linux_box:/ # expr 10 / 2
   5
   GNU/Linux_box:/ # expr 10 * 2
   expr: syntax error

You need to escape the multiplication sign.  Try:

 expr 10 \* 2

And try:

 echo expr 10 * 2

to see why it doesn't work (shell expansion)

Cheers.


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


RE: gsort problem

2006-05-21 Thread Simon Wing-Tang

Hi Paul and Bob,
I probably should also mention that I'm not a big C programmer, but am 
getting there.  Here's the output of "cc -E tempname.c".  I'm not sure if you 
want the whole lot, it's appended below.

  On a very quick check of the system header files the only reference I could 
find to "__open" or "__open64" was in /usr/include/sys/fcntl.h and 
/usr/conf/sys/fcntl.h which have the following lines...

fcntl.h:extern int __open64 __((const char *, int, ...));
fcntl.h:# define open __open64
fcntl.h:  { return __open64(a,b,c); }

Oh, and here is the part of config.log regarding mkstemp...
===

configure:20328: checking for mkstemp
configure:20385: cc -o conftest -D_LARGEFILE64_SOURCE   conftest.c  >&5
configure:20391: $? = 0
configure:20395: test -z
 || test ! -s conftest.err
configure:20398: $? = 0
configure:20401: test -s conftest
configure:20404: $? = 0
configure:20417: result: yes
configure:20441: checking for mkstemp limitations
configure:20477: cc -o conftest -D_LARGEFILE64_SOURCE   conftest.c  >&5
configure:20480: $? = 0
configure:20482: ./conftest
configure:20485: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "GNU coreutils"
| #define PACKAGE_TARNAME "coreutils"
| #define PACKAGE_VERSION "5.94"
| #define PACKAGE_STRING "GNU coreutils 5.94"
| #define PACKAGE_BUGREPORT "bug-coreutils@gnu.org"
| #define PACKAGE "coreutils"
| #define VERSION "5.94"
| #define _GNU_SOURCE 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
.
. snip...
.
| #define HAVE_DECL_MEMRCHR 0
| #define HAVE_MEMSET 1
| #define mktime rpl_mktime
| #define HAVE_DECL_GETENV 1
| #define HAVE_MKSTEMP 1
| /* end confdefs.h.  */
|
| #   include 
| #   include 
|   int main ()
|   {
| int i;
| for (i = 0; i < 70; i++)
|   {
| char template[] = "conftest.mkstemp/coXX";
| int fd = mkstemp (template);
| if (fd == -1)
|   exit (1);
| close (fd);
|   }
| exit (0);
|   }
|
configure:20502: result: yes
===

Regards,

Simon

Output of "cc -E tempname.c"

===

# 1 "tempname.c"
# 24

# 1 "/usr/include/sys/types.h"
# 40

# 1 "/usr/include/sys/stdsyms.h"
# 425

# 41 "/usr/include/sys/types.h"

# 1 "/usr/include/sys/_inttypes.h"
# 59

# 1 "/usr/include/sys/stdsyms.h"
# 425

# 60 "/usr/include/sys/_inttypes.h"
# 86
typedef char int8_t;
typedef unsigned char uint8_t;
typedef short int16_t;
typedef unsigned short uint16_t;
typedef int  int32_t;
typedef unsigned int uint32_t;

typedef int intfast_t;
typedef unsigned int uintfast_t;




typedef long long int64_t;
typedef unsigned long long uint64_t;





typedef int64_t  intmax_t;
typedef uint64_t uintmax_t;
# 116
typedef long  intptr_t;
typedef unsigned long uintptr_t;
# 127
typedef char int_least8_t;


typedef unsigned char uint_least8_t;


typedef int int_fast8_t;


typedef unsigned int uint_fast8_t;


typedef short int_least16_t;


typedef unsigned short uint_least16_t;


typedef int int_fast16_t;


typedef unsigned int uint_fast16_t;


typedef int int_least32_t;


typedef unsigned int uint_least32_t;


typedef int int_fast32_t;


typedef unsigned int uint_fast32_t;





typedef int64_t int_least64_t;


typedef int64_t int_fast64_t;


typedef uint64_t uint_least64_t;


typedef uint64_t uint_fast64_t;
# 192
typedef uint32_t ptr32_t;

typedef uint64_t ptr64_t;
# 202

# 42 "/usr/include/sys/types.h"
# 54
typedef int mqd_t;





 typedef int32_t dev_t;





typedef uint32_t ino32_t;
# 73
   typedef uint64_t ino64_t;
# 88
 typedef unsigned long ino_t;





 typedef uint16_t mode_t;




 typedef uint16_t nlink_t;




typedef int32_t fpos32_t;





   typedef int64_t fpos64_t;









   typedef long fpos_t;






 typedef uint32_t fsblkcnt32_t;





   typedef uint64_t fsblkcnt64_t;
# 143
   typedef unsigned long fsblkcnt_t;





 typedef int32_t   off32_t;




 typedef int32_t   sbsize32_t;
 typedef uint32_t  bsize32_t;





typedef int64_t  off64_t;
# 168
typedef int64_t  sbsize64_t;
typedef uint64_t bsize64_t;
# 179
typedef long  off_t;
# 190
typedef long  sbsize_t;
typedef unsigned long bsize_t;





 typedef uint32_t fsfilcnt32_t;





   typedef uint64_t fsfilcnt64_t;
# 213
typedef unsigned long fsfilcnt_t;





 typedef int32_t blkcnt32_t;





   typedef int64_t blkcnt64_t;
# 235
typedef long blkcnt_t;





 typedef int32_t pid_t;




 typedef int32_t 

Re: Missing variable quoting in m4 files

2006-05-21 Thread Paul Eggert
Roland Illig <[EMAIL PROTECTED]> writes:

> test: =: unary operator expected
>
> So I patched all variable uses to include the proper quotes.

That patch masks the actual error, which is that the variable was used
without being defined.  The underlying bug was fixed in a different
way, as described in
.

I assume you're talking about coreutils 5.95.

Jim, perhaps this fix should also be propagated into the b5_9x branch?
(I just now propagated it into Autoconf CVS.)


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: coreutils 5.95 on IRIX 5.3

2006-05-21 Thread Paul Eggert
Georg Schwarz <[EMAIL PROTECTED]> writes:

> coreutils 5.95, unlike prior releases, seems to build relatively fine
> on IRIX 5.3.

Thanks for the bug report.

> FAIL: symlink-slash

Hmmm, what is the output of the following shell command?

cd tests/cp
VERBOSE=yes make TESTS=symlink-slash check

> - configure does not find /sbin/grep;

Is it important that 'configure' find /sbin/grep rather than
/usr/bin/grep or whatever?  If so, why?  Currently 'configure' walks
through PATH looking for a 'grep' that isn't broken.  Is the problem
that /sbin was not in your PATH, or that the grep test that
'configure' uses doesn't detect brokenness in other versions of 'grep'
on your system?

> - IRIX 5.3's sed does not like some syntax used by config.status:

Most likely this is due to some silly limit in IRIX 5.3 sed, which it
diagnoses incorrectly.  This is really an Autoconf issue, not a
coreutils issue (see, e.g.,
)
but a fix probably won't appear until after Autoconf 2.60 comes out.
In the meantime I suppose you can stick with your GNU sed workaround.


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: Missing variable quoting in m4 files

2006-05-21 Thread Jim Meyering
Paul Eggert <[EMAIL PROTECTED]> wrote:
...
> That patch masks the actual error, which is that the variable was used
> without being defined.  The underlying bug was fixed in a different
> way, as described in
> .
>
> I assume you're talking about coreutils 5.95.
>
> Jim, perhaps this fix should also be propagated into the b5_9x branch?
> (I just now propagated it into Autoconf CVS.)

Thanks.
That fix made it onto the branch just in time for 5.96.


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils