Bruno Haible | 1 Jan 2011 01:51

pread on HP-UX 11

On HP-UX 11.11 and 11.31 I'm observing two different failures of the 'pread'
test:

  test-pread.c:61: assertion failed
  ./test-pread.sh[5]: 26534 Abort(coredump)
  FAIL: test-pread.sh

  test-pread.c:80: assertion failed
  ./test-pread.sh[5]: 13130 Abort(coredump)
  FAIL: test-pread.sh

This patch adds workarounds to gnulib:

2010-12-31  Bruno Haible  <bruno <at> clisp.org>

	pread: Work around HP-UX 11 bugs.
	* m4/pread.m4 (gl_FUNC_PREAD): When pread exists, test whether it works
	and set REPLACE_PREAD if not.
	* doc/posix-functions/pread.texi: Document the HP-UX 11 bugs.

--- doc/posix-functions/pread.texi.orig	Sat Jan  1 01:47:49 2011
+++ doc/posix-functions/pread.texi	Fri Dec 31 23:28:30 2010
 <at>  <at>  -11,6 +11,13  <at>  <at> 
  <at> item
 This function is missing on some platforms:
 HP-UX 10, mingw, BeOS.
+ <at> item
+This function returns zero instead of positive values when large file support
+is enabled on some platforms:
+HP-UX 11.11.
(Continue reading)

Bruno Haible | 1 Jan 2011 02:25

pwrite on HP-UX

On HP-UX 11.11, I'm seeing this test failure:

test-pwrite.c:66: assertion failed
./test-pwrite.sh[5]: 26584 Abort(coredump)
FAIL: test-pwrite.sh

It's due to insufficient parameter checking in the system function.
I'm adding this workaround to gnulib:

2010-12-31  Bruno Haible  <bruno <at> clisp.org>

	pwrite: Work around HP-UX 11.11 bug.
	* m4/pwrite.m4 (gl_FUNC_PWRITE): When pwrite exists, test whether it
	works and set REPLACE_PWRITE if not.
	* lib/pwrite.c (pwrite): Add an implementation that uses the system
	function.
	* doc/posix-functions/pwrite.texi: Document the HP-UX 11 bug.

--- doc/posix-functions/pwrite.texi.orig	Sat Jan  1 02:20:56 2011
+++ doc/posix-functions/pwrite.texi	Sat Jan  1 02:03:28 2011
 <at>  <at>  -11,6 +11,10  <at>  <at> 
  <at> item
 This function is missing on some platforms:
 HP-UX 10, mingw, BeOS.
+ <at> item
+This function does not fail when an invalid (negative) offset is passed when
+large file support is enabled on some platforms:
+HP-UX 11.11.
  <at> end itemize

(Continue reading)

Bruno Haible | 1 Jan 2011 02:33

remove on HP-UX 11

The 'remove' test fails on HP-UX 11.11 and 11.31:

  test-remove.c:81: assertion failed
  sh[10]: 26604 Abort(coredump)
  FAIL: test-remove

The reason is that a particular remove() call fails with EEXIST, not with
the expected EINVAL or EBUSY. This patch fixes it. OK to commit?

2010-12-31  Bruno Haible  <bruno <at> clisp.org>

	remove test: Avoid failure on HP-UX 11.
	* tests/test-remove.c (main): Allow EEXIST as alternative error code.

--- tests/test-remove.c.orig	Sat Jan  1 02:28:42 2011
+++ tests/test-remove.c	Sat Jan  1 02:28:28 2011
 <at>  <at>  -78,7 +78,7  <at>  <at> 
   /* Empty directory.  */
   errno = 0;
   ASSERT (remove (BASE "dir/.//") == -1);
-  ASSERT (errno == EINVAL || errno == EBUSY);
+  ASSERT (errno == EINVAL || errno == EBUSY || errno == EEXIST);
   ASSERT (remove (BASE "dir") == 0);

   /* Test symlink behavior.  Specifying trailing slash should remove

Bruno Haible | 1 Jan 2011 02:58

strtod on HP-UX 11

Hi Eric,

On HP-UX 11.11 and 11.31 I see this test failure:

  test-strtod.c:588: assertion failed

and when this one is fixed:

  test-strtod.c:652: assertion failed

The reason is that the system's strtod function, when parsing infinity or
nan, clobbers errno. (In fact, the test in m4/strtod.m4 fails with exit code
120 = 64 | 32 | 16 | 8.)

This fixes it for me. OK to commit?

2010-12-31  Bruno Haible  <bruno <at> clisp.org>

	strtod: Restore errno when successfully parsing Infinity or NaN.
	* lib/strtod.c (strtod): After successfully parsing an Infinity or NaN,
	restore the original errno.

--- lib/strtod.c.orig	Sat Jan  1 02:53:15 2011
+++ lib/strtod.c	Sat Jan  1 02:53:02 2011
 <at>  <at>  -303,6 +303,7  <at>  <at> 
           && c_tolower (s[4]) == 'y')
         s += 5;
       num = HUGE_VAL;
+      errno = saved_errno;
     }
(Continue reading)

Bruno Haible | 1 Jan 2011 03:55

isfinite on HP-UX 11

On HP-UX 11.11, with CC="cc -Ae -O", I'm observing this test failure:

  test-isfinite.c:54: assertion failed
  sh[10]: 1712 Abort(coredump)
  FAIL: test-isfinite

The cause is that isfinite.c is miscompiled by "cc -O": The comparison
x - x == 0 is "simplified" to x == x; this simplification is wrong for
Infinity values. This patch avoids this bug:

2010-12-31  Bruno Haible  <bruno <at> clisp.org>

	isfinite: Avoid compiler bug of "cc -O" on HP-UX 11.11.
	* lib/isfinite.c (zerof, zerod, zerol): New variables.
	(gl_isfinitef, gl_isfinited, gl_isfinitel): Use them instead of literal
	zero.

--- lib/isfinite.c.orig	Sat Jan  1 03:49:46 2011
+++ lib/isfinite.c	Sat Jan  1 03:44:20 2011
 <at>  <at>  -23,17 +23,30  <at>  <at> 
 #include "isnand-nolibm.h"
 #include "isnanl-nolibm.h"

+/* The "cc" compiler on HP-UX 11.11, when optimizing, simplifies the test
+   x - y == 0.0  to  x == y, a simplification which is invalid when x and y
+   are Infinity.  Disable this optimization.  */
+#if defined __hpux && !defined __GNUC__
+static float zerof;
+static double zerod;
+static long double zerol;
(Continue reading)

Ben Pfaff | 1 Jan 2011 05:49
Picon

[unigbrk 1/2] unigbrk: Fix uc_graphemeclusterbreak_property(), add comprehensive test.

gbrkprop: Fix implementation of uc_graphemeclusterbreak_property.
* lib/unigbrk/gbrkprop.h: Regenerate with gen-uni-tables.c.  I had
modified how this file was generated before I initially submitted
the module, but failed to regenerate it.  This meant that several
of the level2 entries were wrong.
* lib/unigbrk/uc-gbrk-prop.h (uc_graphemeclusterbreak_property):
Remove the division-by-2 that is folded into the table now that
gbrkprop.h has been regenerated properly.  Now -1 entries are
handled correctly.

New module 'unigbrk/uc-gbrk-prop-tests'.
* modules/unigbrk/uc-gbrk-prop-tests: New file.
* lib/gen-uni-tables.c: Generate tests/test-uc-gbrk-prop.h.
* tests/unigbrk/test-uc-gbrk-prop.c: New file.
* tests/unigbrk/test-uc-gbrk-prop.h: New file.
---
 ChangeLog                          |   18 +
 lib/gen-uni-tables.c               |   78 +++
 lib/unigbrk/gbrkprop.h             |   60 +-
 lib/unigbrk/uc-gbrk-prop.c         |    2 +-
 modules/unigbrk/uc-gbrk-prop-tests |   14 +
 tests/unigbrk/test-uc-gbrk-prop.c  |   82 +++
 tests/unigbrk/test-uc-gbrk-prop.h  | 1270 ++++++++++++++++++++++++++++++++++++
 7 files changed, 1493 insertions(+), 31 deletions(-)
 create mode 100644 modules/unigbrk/uc-gbrk-prop-tests
 create mode 100644 tests/unigbrk/test-uc-gbrk-prop.c
 create mode 100644 tests/unigbrk/test-uc-gbrk-prop.h

diff --git a/ChangeLog b/ChangeLog
index 2a0f94f..448d02e 100644
(Continue reading)

Ben Pfaff | 1 Jan 2011 05:49
Picon

[unigbrk 2/2] unigbrk: New modules for grapheme clusters.

New module 'u8-grapheme-len'.
* modules/unigbrk/u8-grapheme-len: New file.
* modules/unigbrk/u8-grapheme-len-tests: New file.
* lib/unigbrk.in.h: Add prototype for new function.
* lib/unigbrk/u8-grapheme-len.c: New file.
* tests/unigbrk/test-u8-grapheme-len.c: New file.

New module 'u16-grapheme-len'.
* modules/unigbrk/u16-grapheme-len: New file.
* modules/unigbrk/u16-grapheme-len-tests: New file.
* lib/unigbrk.in.h: Add prototype for new function.
* lib/unigbrk/u16-grapheme-len.c: New file.
* tests/unigbrk/test-u16-grapheme-len.c: New file.

New module 'u32-grapheme-len'.
* modules/unigbrk/u32-grapheme-len: New file.
* modules/unigbrk/u32-grapheme-len-tests: New file.
* lib/unigbrk.in.h: Add prototype for new function.
* lib/unigbrk/u32-grapheme-len.c: New file.
* tests/unigbrk/test-u32-grapheme-len.c: New file.

New module 'u8-grapheme-next'.
* modules/unigbrk/u8-grapheme-next: New file.
* modules/unigbrk/u8-grapheme-next-tests: New file.
* lib/unigbrk.in.h: Add prototype for new function.
* lib/unigbrk/u8-grapheme-next.c: New file.
* tests/unigbrk/test-u8-grapheme-next.c: New file.

New module 'u16-grapheme-next'.
* modules/unigbrk/u16-grapheme-next: New file.
(Continue reading)

Jim Meyering | 1 Jan 2011 11:09
Gravatar

[PATCH] version-etc: update the copyright year it reports

FYI, without this, coreutils' make syntax check was failing:

From 2d43094c0ef80723db75bfe5fc74f876113e0bc4 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering <at> redhat.com>
Date: Sat, 1 Jan 2011 11:08:18 +0100
Subject: [PATCH] version-etc: update the copyright year it reports

* lib/version-etc.c (COPYRIGHT_YEAR): Update to 2011.
---
 ChangeLog         |    5 +++++
 lib/version-etc.c |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2a0f94f..54853b8 100644
--- a/ChangeLog
+++ b/ChangeLog
 <at>  <at>  -1,3 +1,8  <at>  <at> 
+2011-01-01  Jim Meyering  <meyering <at> redhat.com>
+
+	version-etc: update the copyright year it reports
+	* lib/version-etc.c (COPYRIGHT_YEAR): Update to 2011.
+
 2010-12-31  Bruno Haible  <bruno <at> clisp.org>

 	isfinite: Avoid compiler bug of "cc -O" on HP-UX 11.11.
diff --git a/lib/version-etc.c b/lib/version-etc.c
index 19c873d..8bd5d0e 100644
--- a/lib/version-etc.c
+++ b/lib/version-etc.c
(Continue reading)

Jim Meyering | 1 Jan 2011 12:20
Gravatar

[PATCH 1/2] maint: new rule to update copyright year ranges

Here's the annual patch to update copyright years.
Now, however it should be clear that it's ok to use year ranges,
since the maintainers guide has been adjusted.

It is involved enough to be automated, so I've added a Makefile rule.
The first patch does that.  I'm about to push it.  Of course,
we'll make any necessary changes before the definitive run.

The second patch below is the result of running "make update-copyright"
so you can see the list of affected files and a few diffs.
The entire patch was over 30K lines.

Any adjustments?
More exceptions for generated-yet-VC'd files?

Happy new year.
Jim

From d3f62c9484504ddad1ae4e01bf9b70ffba0609dd Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering <at> redhat.com>
Date: Sat, 1 Jan 2011 12:10:16 +0100
Subject: [PATCH 1/2] maint: new rule to update copyright year ranges

* Makefile (update-copyright): New rule.
---
 ChangeLog |    3 +++
 Makefile  |   20 +++++++++++++++++++-
 2 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
(Continue reading)

Bruno Haible | 1 Jan 2011 13:46

Re: [PATCH 1/2] maint: new rule to update copyright year ranges

Hi Jim,

>  doc/INSTALL                                        |    3 +--
>  doc/INSTALL.ISO                                    |    3 +--
>  doc/INSTALL.UTF-8                                  |    3 +--

These are automatically generated from doc/install.texi. I think Karl would
need to update the master copy of doc/install.texi accordingly?

> The entire patch was over 30K lines.

Can you show the part that affects the files

 config/srclist-update                              
 doc/INSTALL                                        
 doc/INSTALL.ISO                                    
 doc/INSTALL.UTF-8                                  
 doc/parse-datetime.texi                            
 doc/regexprops-generic.texi                        
 lib/arcfour.c                                      
 lib/arcfour.h                                      
 lib/arctwo.c                                       
 lib/arctwo.h                                       
 lib/argmatch.c                                     
 lib/argmatch.h                                     
 lib/argz.in.h                                      
 lib/atoll.c                                        
 lib/base64.c                                       
 lib/binary-io.h                                    
 lib/c-stack.c                                      
(Continue reading)


Gmane