bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI, a few more: gettext, updates from gnulib, typo


From: Jim Meyering
Subject: FYI, a few more: gettext, updates from gnulib, typo
Date: Wed, 26 May 2010 21:58:39 +0200

Here are a few more:

      fix typo in comment
      build: use gettext-0.17
      maint: update helper scripts
      maint: remove useless definitions
      build: update gnulib submodule to latest

>From 656833e1548f455939df72d6c6769ba5ce90538e Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Tue, 25 May 2010 15:42:35 +0200
Subject: [PATCH 02/10] fix typo in comment

---
 libparted/labels/dos.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libparted/labels/dos.c b/libparted/labels/dos.c
index cb51491..f66ca47 100644
--- a/libparted/labels/dos.c
+++ b/libparted/labels/dos.c
@@ -1852,7 +1852,7 @@ _logical_min_start_head (const PedPartition* part,

 /* Shamelessly copied and adapted from _partition_get_overlap_constraint
  * (in disk.c)
- * This should get ride of the infamous Assertion (metadata_length > 0) failed
+ * This should get rid of the infamous Assertion (metadata_length > 0) failed
  * bug for extended msdos disklabels generated by Parted.
  * 1) There always is a partition table at the start of ext_part, so we leave
  *    a one sector gap there.
--
1.7.1.342.g1c280


>From bd5754769fa6435a0166192ca1cca531c500694b Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Wed, 26 May 2010 11:29:56 +0200
Subject: [PATCH 03/10] build: use gettext-0.17

* configure.ac: Use gettext-0.17.
* bootstrap.conf (gnulib_modules): Use gettext-h, not gettext.
since the latter drags in a depedency on gettext 0.18.
---
 bootstrap.conf |    2 +-
 configure.ac   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bootstrap.conf b/bootstrap.conf
index 4ca51a7..9907304 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -34,7 +34,7 @@ gnulib_modules="
        dirname
        fdl
        fsync
-       gettext
+       gettext-h
        git-version-gen
        gitlog-to-changelog
        gnu-web-doc-update
diff --git a/configure.ac b/configure.ac
index ceecacf..9ae5783 100644
--- a/configure.ac
+++ b/configure.ac
@@ -295,7 +295,7 @@ libraries.)
 fi
 AM_PROG_LIBTOOL

-AM_GNU_GETTEXT_VERSION([0.15])
+AM_GNU_GETTEXT_VERSION([0.18])
 AM_GNU_GETTEXT([external])
 if test "$USE_INCLUDED_LIBINTL" = "yes"; then
        AC_MSG_ERROR([
--
1.7.1.342.g1c280


>From c5bf4e515c46fc2427cb4476ad13c7da333892fa Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Wed, 26 May 2010 11:32:56 +0200
Subject: [PATCH 04/10] maint: update helper scripts

* tests/help-version: Update from coreutils.
* bootstrap: Update from gnulib.
* tests/init.sh: Likewise.
---
 bootstrap          |    6 +++-
 tests/help-version |   13 ++++++++-
 tests/init.sh      |   65 +++++++++++++++++++++++++++++++++++++--------------
 3 files changed, 62 insertions(+), 22 deletions(-)

diff --git a/bootstrap b/bootstrap
index a9a778a..2422549 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Print a version string.
-scriptversion=2010-04-30.16; # UTC
+scriptversion=2010-05-17.18; # UTC

 # Bootstrap this package from checked-out sources.

@@ -409,6 +409,7 @@ git_modules_config () {
 }

 gnulib_path=`git_modules_config submodule.gnulib.path`
+: ${gnulib_path=gnulib}

 # Get gnulib files.

@@ -424,7 +425,8 @@ case ${GNULIB_SRCDIR--} in

     trap cleanup_gnulib 1 2 13 15

-    git clone -h|grep -- --depth > /dev/null && shallow='--depth 2' || shallow=
+    shallow=
+    git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2'
     git clone $shallow git://git.sv.gnu.org/gnulib "$gnulib_path" ||
       cleanup_gnulib

diff --git a/tests/help-version b/tests/help-version
index 9d04a49..f644f8d 100755
--- a/tests/help-version
+++ b/tests/help-version
@@ -23,8 +23,7 @@
 test "x$SHELL" = x && SHELL=/bin/sh
 export SHELL

-: ${srcdir=.}
-. $srcdir/init.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../parted

 expected_failure_status_chroot=125
 expected_failure_status_env=125
@@ -184,6 +183,16 @@ shred_setup () { args=$tmp_in; }
 touch_setup () { args=$tmp_in2; }
 truncate_setup () { args="--reference=$tmp_in $tmp_in2"; }

+mkid_setup () { printf 'f(){}\ntypedef int t;\n' > f.c; args=. ; }
+lid_setup () { args=; }
+fid_setup () { args=f.c; }
+fnid_setup () { args=; }
+xtokid_setup () { args=; }
+aid_setup () { args=f; }
+eid_setup () { args=--version; }
+gid_setup () { args=f; }
+defid_setup () { args=t; }
+
 basename_setup () { args=$tmp_in; }
 dirname_setup () { args=$tmp_in; }
 expr_setup () { args=foo; }
diff --git a/tests/init.sh b/tests/init.sh
index 512e876..ef0957c 100644
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -21,11 +21,16 @@
 # The typical skeleton of a test looks like this:
 #
 #   #!/bin/sh
-#   : ${srcdir=.}
-#   . "$srcdir/init.sh"; path_prepend_ .
+#   . "${srcdir=.}/init.sh"; path_prepend_ .
 #   Execute some commands.
 #   Note that these commands are executed in a subdirectory, therefore you
 #   need to prepend "../" to relative filenames in the build directory.
+#   Note that the "path_prepend_ ." is useful only if the body of your
+#   test invokes programs residing in the initial directory.
+#   For example, if the programs you want to test are in src/, and this test
+#   script is named tests/test-1, then you would use "path_prepend_ ../src",
+#   or perhaps export PATH='$(abs_top_builddir)/src$(PATH_SEPARATOR)'"$$PATH"
+#   to all tests via automake's TESTS_ENVIRONMENT.
 #   Set the exit code 0 for success, 77 for skipped, or 1 or other for failure.
 #   Use the skip_ and fail_ functions to print a diagnostic and then exit
 #   with the corresponding exit code.
@@ -58,37 +63,61 @@
 # - hyphen-containing alias names
 # - we prefer to use ${var#...} substitution, rather than having
 #   to work around lack of support for that feature.
-# The following code attempts to find a shell with support for these features
-# and re-exec's it.  If not, it skips the current test.
+# The following code attempts to find a shell with support for these features.
+# If the current shell passes the test, we're done.  Otherwise, test other
+# shells until we find one that passes.  If one is found, re-exec it.
+# If no acceptable shell is found, skip the current test.
+#
+# Use "9" to indicate success (rather than 0), in case some shell acts
+# like Solaris 10's /bin/sh but exits successfully instead of with status 2.

 gl_shell_test_script_='
 test $(echo y) = y || exit 1
-test -z "$EXEEXT" && exit 0
+test -z "$EXEEXT" && exit 9
 shopt -s expand_aliases
 alias a-b="echo zoo"
 v=abx
      test ${v%x} = ab \
   && test ${v#a} = bx \
-  && test $(a-b) = zoo
+  && test $(a-b) = zoo \
+  && exit 9
 '

 if test "x$1" = "x--no-reexec"; then
   shift
 else
-  for re_shell_ in "${CONFIG_SHELL:-no_shell}" /bin/sh bash dash zsh pdksh fail
-  do
-    test "$re_shell_" = no_shell && continue
-    test "$re_shell_" = fail && skip_ failed to find an adequate shell
-    if "$re_shell_" -c "$gl_shell_test_script_" 2>/dev/null; then
-      exec "$re_shell_" "$0" --no-reexec "$@"
-      echo "$ME_: exec failed" 1>&2
-      exit 127
-    fi
-  done
+  # 'eval'ing the above code makes Solaris 10's /bin/sh exit with $? set to 2.
+  # It does not evaluate any of the code after the "unexpected" `('.  Thus,
+  # we must run it in a subshell.
+  ( eval "$gl_shell_test_script_" ) > /dev/null 2>&1
+  if test $? = 9; then
+    : # The current shell is adequate.  No re-exec required.
+  else
+    # Search for a shell that meets our requirements.
+    for re_shell_ in "${CONFIG_SHELL:-no_shell}" /bin/sh bash dash zsh pdksh 
fail
+    do
+      test "$re_shell_" = no_shell && continue
+      test "$re_shell_" = fail && skip_ failed to find an adequate shell
+      "$re_shell_" -c "$gl_shell_test_script_" 2>/dev/null
+      if test $? = 9; then
+        # Found an acceptable shell.
+        exec "$re_shell_" "$0" --no-reexec "$@"
+        echo "$ME_: exec failed" 1>&2
+        exit 127
+      fi
+    done
+  fi
 fi

 test -n "$EXEEXT" && shopt -s expand_aliases

+# Enable glibc's malloc-perturbing option.
+# This is cheap and useful for exposing code that depends on the fact that
+# malloc-related functions often return memory that is mostly zeroed.
+# If you have the time and cycles, use valgrind to do an even better job.
+: ${MALLOC_PERTURB_=87}
+export MALLOC_PERTURB_
+
 # We use a trap below for cleanup.  This requires us to go through
 # hoops to get the right exit status transported through the handler.
 # So use `Exit STATUS' instead of `exit STATUS' inside of the tests.
@@ -114,9 +143,9 @@ framework_failure_() { warn_ "$ME_: set-up failure: $@"; 
Exit 1; }
 # a partition, or to undo any other global state changes.
 cleanup_() { :; }

-if ( diff --version < /dev/null 2>&1 | grep GNU ) 2>&1 > /dev/null; then
+if ( diff --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then
   compare() { diff -u "$@"; }
-elif ( cmp --version < /dev/null 2>&1 | grep GNU ) 2>&1 > /dev/null; then
+elif ( cmp --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then
   compare() { cmp -s "$@"; }
 else
   compare() { cmp "$@"; }
--
1.7.1.342.g1c280


>From d97fbdfd21c1fd80cddc83329a81794d60c2010a Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Wed, 26 May 2010 11:43:09 +0200
Subject: [PATCH 05/10] maint: remove useless definitions

* libparted/fs/xfs/platform_defs.h [__sparc__] (O_DIRECT):
Remove now-unneeded definition.
* parted/table.c (wchar_t): Remove definition.
* parted/strlist.c (wchar_t): Likewise.
* .x-sc_prohibit_always-defined_macros: New file.
Exempt two files from this syntax-check rule.
* Makefile.am (EXTRA_DIST): Add it here.
---
 .x-sc_prohibit_always-defined_macros |    2 ++
 Makefile.am                          |    1 +
 libparted/fs/xfs/platform_defs.h     |    6 ------
 parted/strlist.c                     |    8 --------
 parted/table.c                       |    4 ----
 5 files changed, 3 insertions(+), 18 deletions(-)
 create mode 100644 .x-sc_prohibit_always-defined_macros

diff --git a/.x-sc_prohibit_always-defined_macros 
b/.x-sc_prohibit_always-defined_macros
new file mode 100644
index 0000000..3590338
--- /dev/null
+++ b/.x-sc_prohibit_always-defined_macros
@@ -0,0 +1,2 @@
+^parted/strlist\.h$
+^parted/table\.h$
diff --git a/Makefile.am b/Makefile.am
index d5a32ef..70ca26b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -9,6 +9,7 @@ EXTRA_DIST =                            \
   parted.spec.in                       \
   parted.spec                          \
   .x-sc_GPL_version                    \
+  .x-sc_prohibit_always-defined_macros \
   scripts/data/abi/baseline_symbols.txt \
   scripts/extract_symvers              \
   cfg.mk                               \
diff --git a/libparted/fs/xfs/platform_defs.h b/libparted/fs/xfs/platform_defs.h
index 16ba1c5..2b55752 100644
--- a/libparted/fs/xfs/platform_defs.h
+++ b/libparted/fs/xfs/platform_defs.h
@@ -51,12 +51,6 @@
 # define constpp       char * const *
 #endif

-#ifdef __sparc__
-# ifndef O_DIRECT
-#  define O_DIRECT     0x100000
-# endif
-#endif
-
 typedef loff_t         xfs_off_t;
 typedef uint64_t       xfs_ino_t;
 typedef uint32_t       xfs_dev_t;
diff --git a/parted/strlist.c b/parted/strlist.c
index 310ff01..e20dc04 100644
--- a/parted/strlist.c
+++ b/parted/strlist.c
@@ -38,14 +38,6 @@
 #include <wchar.h>
 #include <wctype.h>

-#else /* ENABLE_NLS */
-
-#ifdef wchar_t
-#undef wchar_t
-#endif
-
-#define wchar_t char
-
 #endif /* !ENABLE_NLS */

 #include "strlist.h"
diff --git a/parted/table.c b/parted/table.c
index 48202dd..d184a5f 100644
--- a/parted/table.c
+++ b/parted/table.c
@@ -36,10 +36,6 @@
 #      define L_(str) L##str
 #else
 #      define L_(str) str
-#       ifdef wchar_t
-#               undef wchar_t
-#       endif
-#       define wchar_t char
 #       define wcslen strlen
 #       define wcswidth strnlen
 #       define wcscat strcat
--
1.7.1.342.g1c280


>From d5c302adc7165a61a0f1d1f2d4b673daa5d507d1 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Wed, 26 May 2010 11:30:02 +0200
Subject: [PATCH 06/10] build: update gnulib submodule to latest

---
 gnulib |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gnulib b/gnulib
index e2843e3..c268320 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit e2843e30e8c2885eb8cbc77e20c4e0f4d562d44d
+Subproject commit c2683209a653dfe553739c586911137b4ef692a7
--
1.7.1.342.g1c280



reply via email to

[Prev in Thread] Current Thread [Next in Thread]