This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project iwhd.git.
The branch, gnulib has been created at 7ffa21ac39d711bfab5da7b847445c1b5db3e9e8 (commit)
- Log ----------------------------------------------------------------- http://repo.or.cz/w/iwhd.git/commit/7ffa21ac39d711bfab5da7b847445c1b5db3e9e8
commit 7ffa21ac39d711bfab5da7b847445c1b5db3e9e8 Author: Jim Meyering meyering@redhat.com Date: Thu Dec 16 12:23:25 2010 +0100
maint: avoid const-related warnings
* auto.c: Impossible to avoid without casts. Add const attributes and then add two casts. * setup.c (dup_json_string): Add const attribute to each parameter.
diff --git a/auto.c b/auto.c index b428bce..50eb1c5 100644 --- a/auto.c +++ b/auto.c @@ -24,7 +24,7 @@ static int auto_db_port; static char auto_arg_port[10];
-static char *auto_arg_mongod[] = { +static const char *const auto_arg_mongod[] = { "mongod", "--port", auto_arg_port, "--dbpath", AUTO_DIR_DB, @@ -36,7 +36,7 @@ static char *auto_arg_mongod[] = { };
/* The --quiet option in mongod is useless, so redirect instead. */ -static char *auto_arg_mongod_quiet[] = { +static const char *const auto_arg_mongod_quiet[] = { "mongod", "--port", auto_arg_port, "--dbpath", AUTO_DIR_DB, @@ -270,7 +270,9 @@ auto_start (int dbport) }
DPRINTF("auto-starting mongodn"); - earg = verbose ? auto_arg_mongod : auto_arg_mongod_quiet; + earg = (verbose + ? (char **) auto_arg_mongod + : (char **) auto_arg_mongod_quiet); pid = auto_spawn(AUTO_BIN_MONGOD, earg); if (pid < 0) return -1; diff --git a/setup.c b/setup.c index 9acce0a..2a03f40 100644 --- a/setup.c +++ b/setup.c @@ -157,7 +157,7 @@ validate_server (unsigned int i) }
static const char * -dup_json_string (json_t *obj, char *field) +dup_json_string (const json_t *obj, const char *field) { const char *tmp;
http://repo.or.cz/w/iwhd.git/commit/c4597f7fc4990f0dc4dc0ae6c5be116e9ea1dd8b
commit c4597f7fc4990f0dc4dc0ae6c5be116e9ea1dd8b Author: Jim Meyering meyering@redhat.com Date: Thu Dec 16 12:20:55 2010 +0100
maint: avoid warning about "noreturn" function
* iwh.h (ATTRIBUTE_NORETURN): Define * rest.c (usage): Use it here, to avoid a warning.
diff --git a/iwh.h b/iwh.h index d6475de..c862273 100644 --- a/iwh.h +++ b/iwh.h @@ -45,6 +45,10 @@ GLOBAL(const char *, me, "here"); # define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #endif
+#ifndef ATTRIBUTE_NORETURN +# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) +#endif + /* * Common parts of autostart * diff --git a/rest.c b/rest.c index 6f98106..ea8b289 100644 --- a/rest.c +++ b/rest.c @@ -1892,7 +1892,7 @@ static const struct option my_options[] = { { NULL, 0, NULL, '0' } };
-static void +static void ATTRIBUTE_NORETURN usage (int status) { if (status != EXIT_SUCCESS)
http://repo.or.cz/w/iwhd.git/commit/8dfe3f897c05855f3d39fd30e7e047ce952b5531
commit 8dfe3f897c05855f3d39fd30e7e047ce952b5531 Author: Jim Meyering meyering@redhat.com Date: Thu Dec 16 12:18:10 2010 +0100
maint: avoid theoretical risk of signed overflow
* rest.c (main): Declare "autostart" as bool and set to true or false rather than incrementing or setting to 0.
diff --git a/rest.c b/rest.c index 4ae4ff2..6f98106 100644 --- a/rest.c +++ b/rest.c @@ -1935,14 +1935,14 @@ main (int argc, char **argv) sem_t the_sem; char *stctx = NULL; char *port_tmp; - int autostart = 0; + bool autostart = false;
set_program_name (argv[0]); atexit (close_stdout);
for (;;) switch (getopt_long(argc,argv,"ac:d:m:p:v",my_options,NULL)) { case 'a': - ++autostart; + autostart = true; break; case 'c': cfg_file = optarg;
http://repo.or.cz/w/iwhd.git/commit/c059c0e95df17316d60bd70974f3b029602738bd
commit c059c0e95df17316d60bd70974f3b029602738bd Author: Jim Meyering meyering@redhat.com Date: Thu Dec 16 12:13:23 2010 +0100
maint: accommodate new, stricter warnings
* rest.c (struct): Avoid const-related warnings.
diff --git a/rest.c b/rest.c index a5cd09b..4ae4ff2 100644 --- a/rest.c +++ b/rest.c @@ -61,7 +61,7 @@ typedef enum { } url_type;
typedef struct { - char *method; + const char *method; url_type utype; MHD_AccessHandlerCallback handler; } rule; @@ -940,8 +940,8 @@ proxy_delete (void *cctx, struct MHD_Connection *conn, const char *url,
/* TBD: get actual bucket list */ typedef struct { - char *rel; - char *link; + const char *rel; + const char *link; } fake_bucket_t;
/* FIXME: ensure that the RHS values here stay in sync with those
http://repo.or.cz/w/iwhd.git/commit/1fbd0757294489f70137770e44ab20fdb4f467c4
commit 1fbd0757294489f70137770e44ab20fdb4f467c4 Author: Jim Meyering meyering@redhat.com Date: Thu Dec 16 11:58:46 2010 +0100
maint: declare follow_link in replica.h
* replica.h (follow_link): Declare.
diff --git a/replica.h b/replica.h index ceaa5ed..67fb38b 100644 --- a/replica.h +++ b/replica.h @@ -25,4 +25,6 @@ void replicate_delete (const char *url, my_state *ms); void replicate_bcreate (const char *bucket, my_state *ms); int get_rep_count (void);
+char *follow_link (char *object, const char *key); + #endif
http://repo.or.cz/w/iwhd.git/commit/371b2b03a156deb7c0190b4a463eaf164f609bbb
commit 371b2b03a156deb7c0190b4a463eaf164f609bbb Author: Jim Meyering meyering@redhat.com Date: Thu Dec 16 11:56:46 2010 +0100
maint: declare cf_put_child to be static
* backend.c (cf_put_child): Make "static" to avoid a warning.
diff --git a/backend.c b/backend.c index b17f4ce..c18d895 100644 --- a/backend.c +++ b/backend.c @@ -1025,7 +1025,7 @@ cf_get_child (void * ctx) }
/* Start a CloudFiles _consumer_. */ -void * +static void * cf_put_child (void * ctx) { pipe_private *pp = ctx;
http://repo.or.cz/w/iwhd.git/commit/90fdaa34458e2ae186ff5f2820c6fa087fb10951
commit 90fdaa34458e2ae186ff5f2820c6fa087fb10951 Author: Jim Meyering meyering@redhat.com Date: Thu Dec 16 11:54:16 2010 +0100
maint: remove unused definitions
* replica.c (ADDR_SIZE): Remove unused definition. (SVC_ACC_SIZE, HEADER_SIZE): Likewise. * setup.c (NEED_NONE): Likewise.
diff --git a/replica.c b/replica.c index 58544d4..f0b4b51 100644 --- a/replica.c +++ b/replica.c @@ -36,11 +36,6 @@ #include "meta.h" #include "replica.h"
-/* Sizes for internal string buffers. */ -#define ADDR_SIZE 1024 -#define SVC_ACC_SIZE 128 -#define HEADER_SIZE 64 - typedef enum { REPL_PUT, /* store an object */ REPL_ODELETE, /* delete an object */ diff --git a/setup.c b/setup.c index 42b46a5..9acce0a 100644 --- a/setup.c +++ b/setup.c @@ -54,7 +54,6 @@ */
/* Bitfield for things to check in validate_server */ -#define NEED_NONE 0 #define NEED_SERVER 0x00000001 #define NEED_CREDS 0x00000002 #define NEED_PATH 0x00000004
http://repo.or.cz/w/iwhd.git/commit/83aef2f0bce333bff50105af9fd86562ef112275
commit 83aef2f0bce333bff50105af9fd86562ef112275 Author: Jim Meyering meyering@redhat.com Date: Thu Dec 16 11:52:30 2010 +0100
do not perform arithmetic on void* pointers
* backend.c (http_put_cons, fs_put_child): Cast to (char*) first. * rest.c (proxy_get_cons): Likewise.
diff --git a/backend.c b/backend.c index 6e9a2cd..b17f4ce 100644 --- a/backend.c +++ b/backend.c @@ -195,7 +195,7 @@ http_put_cons (void *ptr, size_t size, size_t nmemb, void *stream) if (done > total) { done = total; } - memcpy(ptr,ps->data_ptr+pp->offset,done); + memcpy(ptr,(char *)(ps->data_ptr)+pp->offset,done); pp->offset += done; DPRINTF("consumer copied %zu, new offset %zun", done, pp->offset); @@ -1262,7 +1262,8 @@ fs_put_child (void * ctx) while (pipe_cons_wait(pp)) { for (offset = 0; offset < ps->data_len; offset += bytes) { bytes = write(fd, - ps->data_ptr+offset,ps->data_len-offset); + (char *)(ps->data_ptr)+offset, + ps->data_len-offset); if (bytes <= 0) { if (bytes < 0) { error (0, errno, "%s: write failed", diff --git a/rest.c b/rest.c index 2ff063b..a5cd09b 100644 --- a/rest.c +++ b/rest.c @@ -239,7 +239,7 @@ proxy_get_cons (void *ctx, uint64_t pos, char *buf, size_t max) if ((size_t) done > max) { done = max; } - memcpy(buf,ps->data_ptr+pp->offset,done); + memcpy(buf,(char *)(ps->data_ptr)+pp->offset,done); pp->offset += done; DPRINTF("consumer copied %zu, new offset %zun", done, pp->offset);
http://repo.or.cz/w/iwhd.git/commit/5876b06bee5a9412ba372f0d72b4bb629abacc6a
commit 5876b06bee5a9412ba372f0d72b4bb629abacc6a Author: Jim Meyering meyering@redhat.com Date: Thu Dec 16 11:39:41 2010 +0100
build: support configure-time --enable-gcc-warnings option
* configure.ac: Handle new --enable-gcc-warnings option. * Makefile.am (AM_CFLAGS): Use configure-determined $(WARN_CFLAGS) $(WERROR_CFLAGS), rather than hard-coded ones.
diff --git a/Makefile.am b/Makefile.am index 323bcd2..fa7edb8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -13,8 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see http://www.gnu.org/licenses/.
-AM_CFLAGS = -W -Wall -Wextra -Wno-unused -Wformat-security - -Wp,-D_FORTIFY_SOURCE=2 -O2 -fdiagnostics-show-option +AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
# FIXME: don't hard-code 2.0 AM_CPPFLAGS = -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include diff --git a/configure.ac b/configure.ac index 2e1e5a1..bfd6f5d 100644 --- a/configure.ac +++ b/configure.ac @@ -79,6 +79,90 @@ AX_BOOST_BASE AX_BOOST_SYSTEM AX_BOOST_THREAD
+AC_ARG_ENABLE([gcc-warnings], + [AS_HELP_STRING([--enable-gcc-warnings], + [turn on lots of GCC warnings (for developers)])], + [case $enableval in + yes|no) ;; + *) AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;; + esac + gl_gcc_warnings=$enableval], + [gl_gcc_warnings=no] +) + +if test "$gl_gcc_warnings" = yes; then + gl_WARN_ADD([-Werror], [WERROR_CFLAGS]) + AC_SUBST([WERROR_CFLAGS]) + + nw= + # This, $nw, is the list of warnings we disable. + nw="$nw -Wdeclaration-after-statement" # too useful to forbid + nw="$nw -Waggregate-return" # anachronistic + nw="$nw -Wlong-long" # C90 is anachronistic (lib/gethrxtime.h) + nw="$nw -Wc++-compat" # We don't care about C++ compilers + nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib + nw="$nw -Wtraditional" # Warns on #elif which we use often + nw="$nw -Wcast-qual" # Too many warnings for now + nw="$nw -Wconversion" # Too many warnings for now + nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings + nw="$nw -Wsign-conversion" # Too many warnings for now + nw="$nw -Wtraditional-conversion" # Too many warnings for now + nw="$nw -Wunreachable-code" # Too many warnings for now + nw="$nw -Wunused-macros" # bison-generated + nw="$nw -Wpadded" # Our structs are not padded + nw="$nw -Wredundant-decls" # openat.h declares e.g., mkdirat + nw="$nw -Wlogical-op" # any use of fwrite provokes this + nw="$nw -Wformat-nonliteral" # who.c and pinky.c strftime uses + nw="$nw -Wvla" # warnings in gettext.h + nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__ + nw="$nw -Wswitch-enum" # Too many warnings for now + nw="$nw -Wswitch-default" # Too many warnings for now + nw="$nw -Wstack-protector" # not worth working around + nw="$nw -Wstrict-overflow" # in bison-generated code + nw="$nw -Wunsafe-loop-optimizations" # in bison-generated code + nw="$nw -Wmissing-noreturn" # yy_fatal_error in flex-generated code + + gl_MANYWARN_ALL_GCC([ws]) + gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw]) + for w in $ws; do + gl_WARN_ADD([$w]) + done + gl_WARN_ADD([-Wno-unused]) + gl_WARN_ADD([-Wno-missing-field-initializers]) # We need this one + gl_WARN_ADD([-Wno-sign-compare]) # Too many warnings for now + gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now + + # In spite of excluding -Wlogical-op above, it is enabled, as of + # gcc 4.5.0 20090517, and it provokes warnings in cat.c, dd.c, truncate.c + gl_WARN_ADD([-Wno-logical-op]) + + gl_WARN_ADD([-fdiagnostics-show-option]) + gl_WARN_ADD([-funit-at-a-time]) + + AC_SUBST([WARN_CFLAGS]) + + AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.]) + AC_DEFINE([_FORTIFY_SOURCE], [2], + [enable compile-time and run-time bounds-checking, and some warnings]) + AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks]) + + # We use a slightly smaller set of warning options for lib/. + # Remove the following and save the result in GNULIB_WARN_CFLAGS. + nw= + nw="$nw -Wuninitialized" + nw="$nw -Wmissing-prototypes" + nw="$nw -Wold-style-definition" + gl_MANYWARN_COMPLEMENT([GNULIB_WARN_CFLAGS], [$WARN_CFLAGS], [$nw]) + AC_SUBST([GNULIB_WARN_CFLAGS]) + + # For gnulib-tests, the set is slightly smaller still. + nw= + nw="$nw -Wstrict-prototypes" + gl_MANYWARN_COMPLEMENT([GNULIB_TEST_WARN_CFLAGS], + [$GNULIB_WARN_CFLAGS], [$nw]) + AC_SUBST([GNULIB_TEST_WARN_CFLAGS]) +fi + AC_CONFIG_FILES([ Makefile gnulib-tests/Makefile
http://repo.or.cz/w/iwhd.git/commit/b25dcd02204c034521a47bd0678a591004638868
commit b25dcd02204c034521a47bd0678a591004638868 Author: Jim Meyering meyering@redhat.com Date: Wed Dec 15 16:01:07 2010 +0100
clean-up: don't define xmalloc, xstrdup, etc. -- use gnulib's definitions
* qparser.y [PARSER_UNIT_TEST]: Include "xalloc.h". (xalloc_die, xmalloc, xmemdup, xstrdup): Remove definitions. * t/Makefile.am (parser_CPPFLAGS): Append for xalloc.h. (parser_LDADD): Link with gnulib.
diff --git a/qparser.y b/qparser.y index 8e5445e..64f025a 100644 --- a/qparser.y +++ b/qparser.y @@ -255,43 +255,7 @@ paren_expr:
#if defined PARSER_UNIT_TEST
-static void -xalloc_die (void) -{ - error (EXIT_FAILURE, 0, "%s", "memory exhausted"); - - /* The `noreturn' cannot be given to error, since it may return if - its first argument is 0. To help compilers understand the - xalloc_die does not return, call abort. Also, the abort is a - safety feature if exit_failure is 0 (which shouldn't happen). */ - abort (); -} - -/* Allocate N bytes of memory dynamically, with error checking. */ -static void * -xmalloc (size_t n) -{ - void *p = malloc (n); - if (!p && n != 0) - xalloc_die (); - return p; -} - -/* Clone an object P of size S, with error checking. There's no need - for xnmemdup (P, N, S), since xmemdup (P, N * S) works without any - need for an arithmetic overflow check. */ -static void * -xmemdup (void const *p, size_t s) -{ - return memcpy (xmalloc (s), p, s); -} - -/* Clone STRING. */ -static char * -xstrdup (char const *string) -{ - return xmemdup (string, strlen (string) + 1); -} +#include "xalloc.h"
static const struct { char *name; char *value; } hacked_obj_fields[] = { /* Fake object fields for generic unit testing. */ diff --git a/t/Makefile.am b/t/Makefile.am index c2a0af6..87fe3e4 100644 --- a/t/Makefile.am +++ b/t/Makefile.am @@ -30,7 +30,8 @@ check_PROGRAMS = parser BUILT_SOURCES = BUILT_SOURCES += parser.c MAINTAINERCLEANFILES = $(BUILT_SOURCES) -parser_CPPFLAGS = -I $(top_srcdir) +parser_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib +parser_LDADD = -L../lib -liwhd
parser.c: Makefile.am rm -f $@-t $@
http://repo.or.cz/w/iwhd.git/commit/652d185244963c54f102c1b106fab3a5bb46259e
commit 652d185244963c54f102c1b106fab3a5bb46259e Author: Jim Meyering meyering@redhat.com Date: Wed Dec 15 08:23:52 2010 +0100
bootstrap.conf: mention bison
With this, an attempt to build from cloned-sources without "bison" will evoke a nice error from bootstrap. Without this, you'd get a relatively cryptic diagnostic much further down the build road.
diff --git a/bootstrap.conf b/bootstrap.conf index 8b11421..d194728 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -83,6 +83,7 @@ buildreq=" autoconf 2.62 automake 1.11.1 autopoint - +bison - gettext - git 1.4.4 gzip -
http://repo.or.cz/w/iwhd.git/commit/25a002a745a999ea9a4e58def2bf1298737d8643
commit 25a002a745a999ea9a4e58def2bf1298737d8643 Author: Jim Meyering meyering@redhat.com Date: Mon Oct 25 16:35:03 2010 +0200
skip the malloca-tests module; too slow
diff --git a/bootstrap.conf b/bootstrap.conf index d1fbb3a..8b11421 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -15,6 +15,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see http://www.gnu.org/licenses/.
+# This test is fine, but inordinately slow. +avoided_gnulib_modules=' + --avoid=malloca-tests +'
# gnulib modules used by this package. gnulib_modules=' @@ -72,7 +76,7 @@ XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\ # Automake requires that ChangeLog exist. test -f ChangeLog || touch ChangeLog || exit 1
-gnulib_tool_option_extras="--tests-base=$bt/gnulib-tests --with-tests" +gnulib_tool_option_extras="--tests-base=$bt/gnulib-tests --with-tests $avoided_gnulib_modules"
# Build prerequisites buildreq=" http://repo.or.cz/w/iwhd.git/commit/1c518138da2b987619c76eac0eb3020894e1becb
commit 1c518138da2b987619c76eac0eb3020894e1becb Author: Jim Meyering meyering@redhat.com Date: Mon Oct 25 16:27:19 2010 +0200
avoid redundant const -- move it to the right of "*"
diff --git a/setup.c b/setup.c index 2296b15..42b46a5 100644 --- a/setup.c +++ b/setup.c @@ -173,7 +173,7 @@ dup_json_string (json_t *obj, char *field) static int is_reserved_attr (const char *name) { - static const char const *rsvd[] = { + static char const *const rsvd[] = { "name", "type", "host", "port", "key", "secret", "path", NULL };
http://repo.or.cz/w/iwhd.git/commit/2af22e15f0a95fb1e9b32557a4097688794fc532
commit 2af22e15f0a95fb1e9b32557a4097688794fc532 Author: Jim Meyering meyering@redhat.com Date: Mon Oct 25 16:26:03 2010 +0200
disable sc_cast_of_argument_to_free check
diff --git a/cfg.mk b/cfg.mk index 606f70e..4c493be 100644 --- a/cfg.mk +++ b/cfg.mk @@ -26,6 +26,7 @@ skip_low_priority = sc_prohibit_strcmp sc_unmarked_diagnostics sc_error_message_uppercase + sc_cast_of_argument_to_free sc_file_system
# Tests not to run as part of "make distcheck".
http://repo.or.cz/w/iwhd.git/commit/0d9cd613e081776874dabcf298b450dde95c093e
commit 0d9cd613e081776874dabcf298b450dde95c093e Author: Jim Meyering meyering@redhat.com Date: Tue Oct 5 18:21:08 2010 +0200
remove GNUmakefile -- now it is pulled from gnulib
diff --git a/GNUmakefile b/GNUmakefile deleted file mode 100644 index 1622633..0000000 --- a/GNUmakefile +++ /dev/null @@ -1,21 +0,0 @@ -# This makefile is used only if you run GNU Make. -# It is necessary if you modify files in the m4/ directory or -# want to build targets usually of interest only to the maintainer. - -have-Makefile := $(shell test -f Makefile && echo yes) - -# If the user runs GNU make but has not yet run ./configure, -# give them a diagnostic. -ifeq ($(have-Makefile),yes) - -export VERBOSE = yes -include Makefile - -else - -all: - @echo There seems to be no Makefile in this directory. - @echo "You must run ./configure before running `make'." - @exit 1 - -endif
http://repo.or.cz/w/iwhd.git/commit/75c31581176c3d405fb075e997f80a4f51f1b00a
commit 75c31581176c3d405fb075e997f80a4f51f1b00a Author: Jim Meyering meyering@redhat.com Date: Mon Oct 25 15:47:43 2010 +0200
use gnulib's closeout module
diff --git a/rest.c b/rest.c index 73332f9..2ff063b 100644 --- a/rest.c +++ b/rest.c @@ -35,6 +35,7 @@ #include <glib.h>
#include "iwh.h" +#include "closeout.h" #include "progname.h" #include "meta.h" #include "backend.h" @@ -1937,6 +1938,7 @@ main (int argc, char **argv) int autostart = 0;
set_program_name (argv[0]); + atexit (close_stdout);
for (;;) switch (getopt_long(argc,argv,"ac:d:m:p:v",my_options,NULL)) { case 'a':
http://repo.or.cz/w/iwhd.git/commit/8cf7615fec61f889635255bf8158c22ba64dc392
commit 8cf7615fec61f889635255bf8158c22ba64dc392 Author: Jim Meyering meyering@redhat.com Date: Fri Oct 1 15:06:56 2010 +0200
use first gnulib module: progname
* cfg.mk: Enable program_name check. * Makefile.am (iwhd_CPPFLAGS): Use -I$(top_srcdir)/lib. (iwhd_LDADD): Link with gnulib, aka lib/libiwhd.a. * rest.c (main): Use set_program_name.
diff --git a/Makefile.am b/Makefile.am index 7c3d1af..323bcd2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -16,6 +16,7 @@ AM_CFLAGS = -W -Wall -Wextra -Wno-unused -Wformat-security -Wp,-D_FORTIFY_SOURCE=2 -O2 -fdiagnostics-show-option
+# FIXME: don't hard-code 2.0 AM_CPPFLAGS = -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
iwhd_YFLAGS = -d @@ -71,8 +72,9 @@ rpm: dist iwhd.spec chmod 644 $(distdir).tar.gz rpmbuild -ta $(distdir).tar.gz
-iwhd_CPPFLAGS = $(HAIL_CFLAGS) +iwhd_CPPFLAGS = $(HAIL_CFLAGS) -I$(top_srcdir)/lib iwhd_LDADD = + lib/libiwhd.a -lmongoclient $(BOOST_SYSTEM_LIB) $(BOOST_THREAD_LIB) diff --git a/rest.c b/rest.c index 68e2f2c..73332f9 100644 --- a/rest.c +++ b/rest.c @@ -35,6 +35,7 @@ #include <glib.h>
#include "iwh.h" +#include "progname.h" #include "meta.h" #include "backend.h" #include "setup.h" @@ -65,7 +66,6 @@ typedef struct { } rule;
static unsigned short my_port = MY_PORT; -const char *program_name; char *cfg_file = NULL;
static const char *const (reserved_name[]) = {"_default", "_new", "_policy", "_query", NULL}; @@ -1936,7 +1936,7 @@ main (int argc, char **argv) char *port_tmp; int autostart = 0;
- program_name = argv[0]; + set_program_name (argv[0]);
for (;;) switch (getopt_long(argc,argv,"ac:d:m:p:v",my_options,NULL)) { case 'a':
http://repo.or.cz/w/iwhd.git/commit/c615729c5fb2877fea6e0383fb2bda29db570f23
commit c615729c5fb2877fea6e0383fb2bda29db570f23 Author: Jim Meyering meyering@redhat.com Date: Fri Oct 1 14:59:28 2010 +0200
enable no-blank-lines-at-EOF rule
diff --git a/cfg.mk b/cfg.mk index 7e6d86a..606f70e 100644 --- a/cfg.mk +++ b/cfg.mk @@ -31,7 +31,6 @@ skip_low_priority = # Tests not to run as part of "make distcheck". local-checks-to-skip = sc_program_name - sc_prohibit_empty_lines_at_EOF sc_space_tab sc_useless_cpp_parens $(skip_low_priority) diff --git a/notes.txt b/notes.txt index e449542..92e4646 100644 --- a/notes.txt +++ b/notes.txt @@ -190,4 +190,3 @@ To Do - priority (1 highest) work (5 largest) desc: 5 5 replicated DB partial-object reads partial-object writes? -
http://repo.or.cz/w/iwhd.git/commit/693fc8a86fc54bd2f29c31ab2cefa1d86add8767
commit 693fc8a86fc54bd2f29c31ab2cefa1d86add8767 Author: Jim Meyering meyering@redhat.com Date: Fri Oct 1 14:57:45 2010 +0200
enable "test -a/-o" prohibition
diff --git a/cfg.mk b/cfg.mk index 0fa7fae..7e6d86a 100644 --- a/cfg.mk +++ b/cfg.mk @@ -32,7 +32,6 @@ skip_low_priority = local-checks-to-skip = sc_program_name sc_prohibit_empty_lines_at_EOF - sc_prohibit_test_minus_ao sc_space_tab sc_useless_cpp_parens $(skip_low_priority) diff --git a/m4/ax_boost_base.m4 b/m4/ax_boost_base.m4 index d368238..1aa3c2f 100644 --- a/m4/ax_boost_base.m4 +++ b/m4/ax_boost_base.m4 @@ -197,7 +197,7 @@ if test "x$want_boost" = "xyes"; then stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'` stage_version_shorten=`expr $stage_version : '([[0-9]]*.[[0-9]]*)'` V_CHECK=`expr $stage_version_shorten >= $_version` - if test "$V_CHECK" = "1" -a "$ac_boost_lib_path" = "" ; then + if test "$V_CHECK" = "1" && test "$ac_boost_lib_path" = "" ; then AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT) BOOST_CPPFLAGS="-I$BOOST_ROOT" BOOST_LDFLAGS="-L$BOOST_ROOT/stage/$libsubdir"
http://repo.or.cz/w/iwhd.git/commit/839172bc2f35f8ba37ab59bdd25ea482a6e86c15
commit 839172bc2f35f8ba37ab59bdd25ea482a6e86c15 Author: Jim Meyering meyering@redhat.com Date: Fri Oct 1 14:56:30 2010 +0200
enable "echo -n/-e" prohibition
diff --git a/cfg.mk b/cfg.mk index da52286..0fa7fae 100644 --- a/cfg.mk +++ b/cfg.mk @@ -31,7 +31,6 @@ skip_low_priority = # Tests not to run as part of "make distcheck". local-checks-to-skip = sc_program_name - sc_prohibit_echo_minus_en sc_prohibit_empty_lines_at_EOF sc_prohibit_test_minus_ao sc_space_tab diff --git a/doc/warehouse_api_final.md b/doc/warehouse_api_final.md index 0747c1b..b5d7294 100644 --- a/doc/warehouse_api_final.md +++ b/doc/warehouse_api_final.md @@ -167,7 +167,7 @@ single attribute:
The attribute can also be set with a PUT to the same URL.
- $ echo -n green | curl -T - http://fserver-1:9090/my_bucket/file1/color + $ printf green | curl -T - http://fserver-1:9090/my_bucket/file1/color
Lastly, objects and attributes can be deleted (object deletes are propagated to secondary warehouses). @@ -213,7 +213,7 @@ Replication Policies Replication policies are stored as "_policy" attributes on objects. To set a policy, use the same mechanism as for other attributes.
- $ echo -n '$color == "green"' | curl -T - http://fserver-1:9090/my_bucket/file1/_policy + $ printf '$color == "green"' | curl -T - http://fserver-1:9090/my_bucket/file1/_policy
This will cause the warehouse daemon to replicate to all secondary warehouses whenever the object is changed (including attribute @@ -235,12 +235,12 @@ what you want for two other reasons: To specify selective replication, matching object atttributes with secondary-warehouse attributes, you would do this instead.
- $ echo -n '$color == #color' | curl -T - http://fserver-1:9090/my_bucket/file1/_policy + $ printf '$color == #color' | curl -T - http://fserver-1:9090/my_bucket/file1/_policy
To set a default replication policy for all objects within a bucket, use the "_default" pseudo-object.
- $ echo -n '$color == #color' | curl -T - http://fserver-1:9090/my_bucket/_default/_policy + $ printf '$color == #color' | curl -T - http://fserver-1:9090/my_bucket/_default/_policy
This will cause any modification to a green object to be replicated to green remote warehouses any time they are changed, but will diff --git a/t/replication b/t/replication index 835fa68..803fe2c 100644 --- a/t/replication +++ b/t/replication @@ -74,7 +74,7 @@ test -f fs_upstream/rbucket/dflt_test || fail=1 test -f fs_downstream/rbucket/dflt_test && fail=1
# Set the replication policy to always replicate. -echo -n 1 | curl -T - $bkt/_default/_policy || fail=1 +printf 1 | curl -T - $bkt/_default/_policy || fail=1
# Add a file, make sure it *is* replicated. echo foo | curl -T - $bkt/pos_test || fail=1 @@ -83,18 +83,18 @@ test -f fs_upstream/rbucket/pos_test || fail=1 test -f fs_downstream/rbucket/pos_test || fail=1
# Make sure we can do selective replication based on object/site attributes. -echo -n '$color==#color' | curl -T - $bkt/_default/_policy || fail=1 +printf '$color==#color' | curl -T - $bkt/_default/_policy || fail=1
# Positive test. # NB this file is also used by the delete test below -echo -n blue | curl -T - $bkt/sel_pos/color || fail=1 -echo -n foo | curl -T - $bkt/sel_pos || fail=1 +printf blue | curl -T - $bkt/sel_pos/color || fail=1 +printf foo | curl -T - $bkt/sel_pos || fail=1 wait_for .1 50 "wait_for_repl $api" || fail_ "replication seems stuck" test -f fs_downstream/rbucket/sel_pos || fail=1
# Negative test. -echo -n red | curl -T - $bkt/sel_neg/color || fail=1 -echo -n foo | curl -T - $bkt/sel_neg || fail=1 +printf red | curl -T - $bkt/sel_neg/color || fail=1 +printf foo | curl -T - $bkt/sel_neg || fail=1 wait_for .1 50 "wait_for_repl $api" || fail_ "replication seems stuck" test -f fs_downstream/rbucket/sel_neg && fail=1
@@ -106,10 +106,10 @@ test -f fs_downstream/rbucket/sel_pos && fail=1
# Test re-replication when we change an attribute. echo hello | curl -T - $bkt/attr_chg -echo -n 'red' | curl -T - $bkt/attr_chg/color -echo -n '$color=="blue"' | curl -T - $bkt/attr_chg/_policy +printf red | curl -T - $bkt/attr_chg/color +printf '$color=="blue"' | curl -T - $bkt/attr_chg/_policy test -f fs_downstream/rbucket/attr_chg && fail=1 -echo -n 'blue' | curl -T - $bkt/attr_chg/color +printf blue | curl -T - $bkt/attr_chg/color wait_for .1 50 "wait_for_repl $api" || fail_ "replication seems stuck" test -f fs_downstream/rbucket/attr_chg || fail=1
http://repo.or.cz/w/iwhd.git/commit/72b4c4ff6037f506c78b839a48aa88a73fad5a95
commit 72b4c4ff6037f506c78b839a48aa88a73fad5a95 Author: Jim Meyering meyering@redhat.com Date: Fri Oct 1 14:54:56 2010 +0200
enable m4 quoting check
diff --git a/cfg.mk b/cfg.mk index 1ac61c7..da52286 100644 --- a/cfg.mk +++ b/cfg.mk @@ -30,7 +30,6 @@ skip_low_priority = # Tests not to run as part of "make distcheck". local-checks-to-skip = - sc_m4_quote_check sc_program_name sc_prohibit_echo_minus_en sc_prohibit_empty_lines_at_EOF diff --git a/m4/ax_boost_base.m4 b/m4/ax_boost_base.m4 index 8f935f6..d368238 100644 --- a/m4/ax_boost_base.m4 +++ b/m4/ax_boost_base.m4 @@ -17,7 +17,7 @@ # # This macro calls: # -# AC_SUBST(BOOST_CPPFLAGS) / AC_SUBST(BOOST_LDFLAGS) +# AC_SUBST([BOOST_CPPFLAGS]) / AC_SUBST([BOOST_LDFLAGS]) # # And sets: # @@ -238,9 +238,9 @@ if test "x$want_boost" = "xyes"; then # execute ACTION-IF-NOT-FOUND (if present): ifelse([$3], , :, [$3]) else - AC_SUBST(BOOST_CPPFLAGS) - AC_SUBST(BOOST_LDFLAGS) - AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available]) + AC_SUBST([BOOST_CPPFLAGS]) + AC_SUBST([BOOST_LDFLAGS]) + AC_DEFINE([HAVE_BOOST],,[define if the Boost library is available]) # execute ACTION-IF-FOUND (if present): ifelse([$2], , :, [$2]) fi diff --git a/m4/ax_boost_system.m4 b/m4/ax_boost_system.m4 index e9aecb5..612d6a6 100644 --- a/m4/ax_boost_system.m4 +++ b/m4/ax_boost_system.m4 @@ -14,7 +14,7 @@ # # This macro calls: # -# AC_SUBST(BOOST_SYSTEM_LIB) +# AC_SUBST([BOOST_SYSTEM_LIB]) # # And sets: # @@ -76,9 +76,9 @@ AC_DEFUN([AX_BOOST_SYSTEM], AC_LANG_POP([C++]) ]) if test "x$ax_cv_boost_system" = "xyes"; then - AC_SUBST(BOOST_CPPFLAGS) + AC_SUBST([BOOST_CPPFLAGS])
- AC_DEFINE(HAVE_BOOST_SYSTEM,,[define if the Boost::System library is available]) + AC_DEFINE([HAVE_BOOST_SYSTEM],,[define if the Boost::System library is available]) BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^/@:>@*//'`
LDFLAGS_SAVE=$LDFLAGS @@ -86,14 +86,14 @@ AC_DEFUN([AX_BOOST_SYSTEM], for libextension in `ls $BOOSTLIBDIR/libboost_system*.so* $BOOSTLIBDIR/libboost_system*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib(boost_system.*).so.*$;1;' -e 's;^lib(boost_system.*).a*$;1;'` ; do ax_lib=${libextension} AC_CHECK_LIB($ax_lib, exit, - [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break], + [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST([BOOST_SYSTEM_LIB]) link_system="yes"; break], [link_system="no"]) done if test "x$link_system" != "xyes"; then for libextension in `ls $BOOSTLIBDIR/boost_system*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^(boost_system.*).dll.*$;1;' -e 's;^(boost_system.*).a*$;1;'` ; do ax_lib=${libextension} AC_CHECK_LIB($ax_lib, exit, - [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break], + [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST([BOOST_SYSTEM_LIB]) link_system="yes"; break], [link_system="no"]) done fi @@ -101,7 +101,7 @@ AC_DEFUN([AX_BOOST_SYSTEM], else for ax_lib in $ax_boost_user_system_lib boost_system-$ax_boost_user_system_lib; do AC_CHECK_LIB($ax_lib, exit, - [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break], + [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST([BOOST_SYSTEM_LIB]) link_system="yes"; break], [link_system="no"]) done
diff --git a/m4/ax_boost_thread.m4 b/m4/ax_boost_thread.m4 index 1fcb867..b67b596 100644 --- a/m4/ax_boost_thread.m4 +++ b/m4/ax_boost_thread.m4 @@ -14,7 +14,7 @@ # # This macro calls: # -# AC_SUBST(BOOST_THREAD_LIB) +# AC_SUBST([BOOST_THREAD_LIB]) # # And sets: # @@ -91,9 +91,9 @@ AC_DEFUN([AX_BOOST_THREAD], BOOST_CPPFLAGS="-pthread $BOOST_CPPFLAGS" fi
- AC_SUBST(BOOST_CPPFLAGS) + AC_SUBST([BOOST_CPPFLAGS])
- AC_DEFINE(HAVE_BOOST_THREAD,,[define if the Boost::Thread library is available]) + AC_DEFINE([HAVE_BOOST_THREAD],,[define if the Boost::Thread library is available]) BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^/@:>@*//'`
LDFLAGS_SAVE=$LDFLAGS @@ -107,14 +107,14 @@ AC_DEFUN([AX_BOOST_THREAD], for libextension in `ls $BOOSTLIBDIR/libboost_thread*.so* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib(boost_thread.*).so.*$;1;'` `ls $BOOSTLIBDIR/libboost_thread*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib(boost_thread.*).a*$;1;'`; do ax_lib=${libextension} AC_CHECK_LIB($ax_lib, exit, - [BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break], + [BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST([BOOST_THREAD_LIB]) link_thread="yes"; break], [link_thread="no"]) done if test "x$link_thread" != "xyes"; then for libextension in `ls $BOOSTLIBDIR/boost_thread*.dll* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^(boost_thread.*).dll.*$;1;'` `ls $BOOSTLIBDIR/boost_thread*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^(boost_thread.*).a*$;1;'` ; do ax_lib=${libextension} AC_CHECK_LIB($ax_lib, exit, - [BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break], + [BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST([BOOST_THREAD_LIB]) link_thread="yes"; break], [link_thread="no"]) done fi @@ -122,7 +122,7 @@ AC_DEFUN([AX_BOOST_THREAD], else for ax_lib in $ax_boost_user_thread_lib boost_thread-$ax_boost_user_thread_lib; do AC_CHECK_LIB($ax_lib, exit, - [BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break], + [BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST([BOOST_THREAD_LIB]) link_thread="yes"; break], [link_thread="no"]) done
http://repo.or.cz/w/iwhd.git/commit/c8d0be9f4c70775fca231996d1420e717628cc6c
commit c8d0be9f4c70775fca231996d1420e717628cc6c Author: Jim Meyering meyering@redhat.com Date: Fri Oct 1 14:50:16 2010 +0200
maint: remove unused #include directives spotted by "make syntax-check"
diff --git a/backend.c b/backend.c index 6f5945c..6e9a2cd 100644 --- a/backend.c +++ b/backend.c @@ -16,7 +16,6 @@ #include <config.h>
#include <fcntl.h> -#include <getopt.h> #include <poll.h> #include <pthread.h> #include <regex.h> @@ -25,11 +24,9 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <strings.h> #include <unistd.h> #include <sys/stat.h> #include <sys/wait.h> -#include <assert.h> #include <errno.h> #include <error.h>
diff --git a/cfg.mk b/cfg.mk index c8d3768..1ac61c7 100644 --- a/cfg.mk +++ b/cfg.mk @@ -32,12 +32,9 @@ skip_low_priority = local-checks-to-skip = sc_m4_quote_check sc_program_name - sc_prohibit_assert_without_use sc_prohibit_echo_minus_en sc_prohibit_empty_lines_at_EOF - sc_prohibit_getopt_without_use sc_prohibit_test_minus_ao - sc_prohibit_strings_without_use sc_space_tab sc_useless_cpp_parens $(skip_low_priority) diff --git a/mpipe.h b/mpipe.h index 33ae9e5..9d0f795 100644 --- a/mpipe.h +++ b/mpipe.h @@ -17,7 +17,6 @@ #define _MPIPE_H
#include <fcntl.h> -#include <getopt.h> #include <poll.h> #include <pthread.h> #include <semaphore.h> diff --git a/replica.c b/replica.c index 9487c33..58544d4 100644 --- a/replica.c +++ b/replica.c @@ -18,7 +18,6 @@ #include <errno.h> #include <error.h> #include <fcntl.h> -#include <getopt.h> #include <poll.h> #include <pthread.h> #include <semaphore.h> @@ -26,9 +25,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <strings.h> #include <unistd.h> -#include <assert.h>
#include <hstor.h> #include <microhttpd.h> /* for HTTP status values */ diff --git a/rest.c b/rest.c index 8c1860c..68e2f2c 100644 --- a/rest.c +++ b/rest.c @@ -25,7 +25,6 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <strings.h> #include <unistd.h> #include <sys/stat.h> #include <assert.h> diff --git a/setup.c b/setup.c index 9ad13f1..2296b15 100644 --- a/setup.c +++ b/setup.c @@ -18,7 +18,6 @@ #include <errno.h> #include <error.h> #include <fcntl.h> -#include <getopt.h> #include <poll.h> #include <pthread.h> #include <semaphore.h> @@ -28,7 +27,6 @@ #include <string.h> #include <strings.h> #include <unistd.h> -#include <assert.h>
#include <jansson.h>
http://repo.or.cz/w/iwhd.git/commit/2bbe861de39bc6e0e3220fefcbbb40dbeaa84e1d
commit 2bbe861de39bc6e0e3220fefcbbb40dbeaa84e1d Author: Jim Meyering meyering@redhat.com Date: Fri Oct 1 14:41:02 2010 +0200
maint: enable no-trailing blanks prohibition
diff --git a/.x-sc_trailing_blank b/.x-sc_trailing_blank new file mode 100644 index 0000000..9726d11 --- /dev/null +++ b/.x-sc_trailing_blank @@ -0,0 +1 @@ +^doc/image_repo.odt$ diff --git a/cfg.mk b/cfg.mk index d92f4ce..c8d3768 100644 --- a/cfg.mk +++ b/cfg.mk @@ -39,7 +39,6 @@ local-checks-to-skip = sc_prohibit_test_minus_ao sc_prohibit_strings_without_use sc_space_tab - sc_trailing_blank sc_useless_cpp_parens $(skip_low_priority)
http://repo.or.cz/w/iwhd.git/commit/88b1d8ae3d489a1df5d687a3422627d8cfc31f7b
commit 88b1d8ae3d489a1df5d687a3422627d8cfc31f7b Author: Jim Meyering meyering@redhat.com Date: Thu Sep 30 16:44:11 2010 +0200
Use gnulib
Add gnulib as a submodule. Move ax/*.m4 to m4/*. * bootstrap: New file. Copied from gnulib. Fill in blanks in bootstrap.conf template. New file, cfg.mk, is very similar to what's used in other projects. * configure.ac: use gl_INIT and gl_EARLY, per documentation. Generate a Makefile for each of the new lib/ and gnulib-tests/ directories. * Makefile.am (SUBDIRS): Update so we build in lib before "." and so that "make check" runs the tests in gnulib-tests. * rest.c: Do not hard-code 1.0 as version number. * .gitignore: Ignore gnulib-tests.
diff --git a/.gitignore b/.gitignore index 6fbf252..892be03 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,5 @@ ChangeLog Makefile Makefile.in #*# +/GNUmakefile +/gnulib-tests diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..acb2669 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "gnulib"] + path = gnulib + url = git://git.sv.gnu.org/gnulib.git diff --git a/INSTALL b/INSTALL deleted file mode 100644 index 7d1c323..0000000 --- a/INSTALL +++ /dev/null @@ -1,365 +0,0 @@ -Installation Instructions -************************* - -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006, 2007, 2008, 2009 Free Software Foundation, Inc. - - Copying and distribution of this file, with or without modification, -are permitted in any medium without royalty provided the copyright -notice and this notice are preserved. This file is offered as-is, -without warranty of any kind. - -Basic Installation -================== - - Briefly, the shell commands `./configure; make; make install' should -configure, build, and install this package. The following -more-detailed instructions are generic; see the `README' file for -instructions specific to this package. Some packages provide this -`INSTALL' file but do not implement all of the features documented -below. The lack of an optional feature in a given package is not -necessarily a bug. More recommendations for GNU packages can be found -in *note Makefile Conventions: (standards)Makefile Conventions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). - - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. Caching is -disabled by default to prevent problems with accidental use of stale -cache files. - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. - - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You need `configure.ac' if -you want to change it or regenerate `configure' using a newer version -of `autoconf'. - - The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. - - Running `configure' might take a while. While running, it prints - some messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package, generally using the just-built uninstalled binaries. - - 4. Type `make install' to install the programs and any data files and - documentation. When installing into a prefix owned by root, it is - recommended that the package be configured and built as a regular - user, and only the `make install' phase executed with root - privileges. - - 5. Optionally, type `make installcheck' to repeat any self-tests, but - this time using the binaries in their final installed location. - This target does not install anything. Running this target as a - regular user, particularly if the prior `make install' required - root privileges, verifies that the installation completed - correctly. - - 6. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - - 7. Often, you can also type `make uninstall' to remove the installed - files again. In practice, not all packages have tested that - uninstallation works correctly, even though it is required by the - GNU Coding Standards. - - 8. Some packages, particularly those that use Automake, provide `make - distcheck', which can by used by developers to test that all other - targets like `make install' and `make uninstall' work correctly. - This target is generally not run by end users. - -Compilers and Options -===================== - - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. Run `./configure --help' -for details on some of the pertinent environment variables. - - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: - - ./configure CC=c99 CFLAGS=-g LIBS=-lposix - - *Note Defining Variables::, for more details. - -Compiling For Multiple Architectures -==================================== - - You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you can use GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. This -is known as a "VPATH" build. - - With a non-GNU `make', it is safer to compile the package for one -architecture at a time in the source code directory. After you have -installed the package for one architecture, use `make distclean' before -reconfiguring for another architecture. - - On MacOS X 10.5 and later systems, you can create libraries and -executables that work on multiple system types--known as "fat" or -"universal" binaries--by specifying multiple `-arch' options to the -compiler but only a single `-arch' option to the preprocessor. Like -this: - - ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" - CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" - CPP="gcc -E" CXXCPP="g++ -E" - - This is not guaranteed to produce working output in all cases, you -may have to build one architecture at a time and combine the results -using the `lipo' tool if you have problems. - -Installation Names -================== - - By default, `make install' installs the package's commands under -`/usr/local/bin', include files under `/usr/local/include', etc. You -can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX', where PREFIX must be an -absolute file name. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -pass the option `--exec-prefix=PREFIX' to `configure', the package uses -PREFIX as the prefix for installing programs and libraries. -Documentation and other data files still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=DIR' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. In general, the -default for these options is expressed in terms of `${prefix}', so that -specifying just `--prefix' will affect all of the other directory -specifications that were not explicitly provided. - - The most portable way to affect installation locations is to pass the -correct locations to `configure'; however, many packages provide one or -both of the following shortcuts of passing variable assignments to the -`make install' command line to change installation locations without -having to reconfigure or recompile. - - The first method involves providing an override variable for each -affected directory. For example, `make install -prefix=/alternate/directory' will choose an alternate location for all -directory configuration variables that were expressed in terms of -`${prefix}'. Any directories that were specified during `configure', -but not in terms of `${prefix}', must each be overridden at install -time for the entire installation to be relocated. The approach of -makefile variable overrides for each directory variable is required by -the GNU Coding Standards, and ideally causes no recompilation. -However, some platforms have known limitations with the semantics of -shared libraries that end up requiring recompilation when using this -method, particularly noticeable in packages that use GNU Libtool. - - The second method involves providing the `DESTDIR' variable. For -example, `make install DESTDIR=/alternate/directory' will prepend -`/alternate/directory' before all installation names. The approach of -`DESTDIR' overrides is not required by the GNU Coding Standards, and -does not work on platforms that have drive letters. On the other hand, -it does better at avoiding recompilation issues, and works well even -when some directory options were not specified in terms of `${prefix}' -at `configure' time. - -Optional Features -================= - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - - Some packages offer the ability to configure how verbose the -execution of `make' will be. For these packages, running `./configure ---enable-silent-rules' sets the default to minimal output, which can be -overridden with `make V=1'; while running `./configure ---disable-silent-rules' sets the default to verbose, which can be -overridden with `make V=0'. - -Particular systems -================== - - On HP-UX, the default C compiler is not ANSI C compatible. If GNU -CC is not installed, it is recommended to use the following options in -order to use an ANSI C compiler: - - ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" - -and if that doesn't work, install pre-built binaries of GCC for HP-UX. - - On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot -parse its `<wchar.h>' header file. The option `-nodtk' can be used as -a workaround. If GNU CC is not installed, it is therefore recommended -to try - - ./configure CC="cc" - -and if that doesn't work, try - - ./configure CC="cc -nodtk" - - On Solaris, don't put `/usr/ucb' early in your `PATH'. This -directory contains several dysfunctional programs; working variants of -these programs are available in `/usr/bin'. So, if you need `/usr/ucb' -in your `PATH', put it _after_ `/usr/bin'. - - On Haiku, software installed for all users goes in `/boot/common', -not `/usr/local'. It is recommended to use the following options: - - ./configure --prefix=/boot/common - -Specifying the System Type -========================== - - There may be some features `configure' cannot figure out -automatically, but needs to determine by the type of machine the package -will run on. Usually, assuming the package is built to be run on the -_same_ architectures, `configure' can figure that out, but if it prints -a message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - - CPU-COMPANY-SYSTEM - -where SYSTEM can have one of these forms: - - OS - KERNEL-OS - - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the option `--target=TYPE' to select the type of system they will -produce code for. - - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. - -Sharing Defaults -================ - - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Defining Variables -================== - - Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: - - ./configure CC=/usr/local2/bin/gcc - -causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). - -Unfortunately, this technique does not work for `CONFIG_SHELL' due to -an Autoconf bug. Until the bug is fixed you can use this workaround: - - CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash - -`configure' Invocation -====================== - - `configure' recognizes the following options to control how it -operates. - -`--help' -`-h' - Print a summary of all of the options to `configure', and exit. - -`--help=short' -`--help=recursive' - Print a summary of the options unique to this package's - `configure', and exit. The `short' variant lists options used - only in the top level, while the `recursive' variant lists options - also present in any nested packages. - -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`--prefix=DIR' - Use DIR as the installation prefix. *note Installation Names:: - for more details, including other options available for fine-tuning - the installation locations. - -`--no-create' -`-n' - Run the configure checks, but stop before creating any output - files. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. - diff --git a/Makefile.am b/Makefile.am index 84d96ab..7c3d1af 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,8 +20,8 @@ AM_CPPFLAGS = -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
iwhd_YFLAGS = -d
-SUBDIRS = . t man -ACLOCAL_AMFLAGS = -I ax +SUBDIRS = lib . t man gnulib-tests +ACLOCAL_AMFLAGS = -I m4
# iwhd is short for Image WareHouse Daemon. bin_PROGRAMS = iwhd diff --git a/bootstrap b/bootstrap new file mode 100755 index 0000000..5ab4cf7 --- /dev/null +++ b/bootstrap @@ -0,0 +1,858 @@ +#! /bin/sh +# Print a version string. +scriptversion=2010-07-06.10; # UTC + +# Bootstrap this package from checked-out sources. + +# Copyright (C) 2003-2010 Free Software Foundation, Inc. + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. + +# Originally written by Paul Eggert. The canonical version of this +# script is maintained as build-aux/bootstrap in gnulib, however, to +# be useful to your project, you should place a copy of it under +# version control in the top-level directory of your project. The +# intent is that all customization can be done with a bootstrap.conf +# file also maintained in your version control; gnulib comes with a +# template build-aux/bootstrap.conf to get you started. + +# Please report bugs or propose patches to bug-gnulib@gnu.org. + +nl=' +' + +# Ensure file names are sorted consistently across platforms. +LC_ALL=C +export LC_ALL + +local_gl_dir=gl + +# Temporary directory names. +bt='._bootmp' +bt_regex=`echo "$bt"| sed 's/./[.]/g'` +bt2=${bt}2 + +usage() { + cat <<EOF +Usage: $0 [OPTION]... +Bootstrap this package from the checked-out sources. + +Options: + --gnulib-srcdir=DIRNAME Specify the local directory where gnulib + sources reside. Use this if you already + have gnulib sources on your machine, and + do not want to waste your bandwidth downloading + them again. Defaults to $GNULIB_SRCDIR. + --copy Copy files instead of creating symbolic links. + --force Attempt to bootstrap even if the sources seem + not to have been checked out. + --skip-po Do not download po files. + +If the file $0.conf exists in the same directory as this script, its +contents are read as shell variables to configure the bootstrap. + +For build prerequisites, environment variables like $AUTOCONF and $AMTAR +are honored. + +Running without arguments will suffice in most cases. +EOF +} + +# Configuration. + +# Name of the Makefile.am +gnulib_mk=gnulib.mk + +# List of gnulib modules needed. +gnulib_modules= + +# Any gnulib files needed that are not in modules. +gnulib_files= + +# A function to be called after everything else in this script. +# Override it via your own definition in bootstrap.conf. +bootstrap_epilogue() { :; } + +# The command to download all .po files for a specified domain into +# a specified directory. Fill in the first %s is the domain name, and +# the second with the destination directory. Use rsync's -L and -r +# options because the latest/%s directory and the .po files within are +# all symlinks. +po_download_command_format=+"rsync --delete --exclude '*.s1' -Lrtvz + 'translationproject.org::tp/latest/%s/' '%s'" + +extract_package_name=' + /^AC_INIT(/{ + /.*,.*,.*, */{ + s/// + s/[][]//g + s/)$// + p + q + } + s/AC_INIT([*// + s/]*,.*// + s/^GNU // + y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ + s/[^A-Za-z0-9_]/-/g + p + } +' +package=`sed -n "$extract_package_name" configure.ac` || exit +gnulib_name=lib$package + +build_aux=build-aux +source_base=lib +m4_base=m4 +doc_base=doc +tests_base=tests + +# Extra files from gnulib, which override files from other sources. +gnulib_extra_files=" + $build_aux/install-sh + $build_aux/missing + $build_aux/mdate-sh + $build_aux/texinfo.tex + $build_aux/depcomp + $build_aux/config.guess + $build_aux/config.sub + doc/INSTALL +" + +# Additional gnulib-tool options to use. Use "newline" to break lines. +gnulib_tool_option_extras= + +# Other locale categories that need message catalogs. +EXTRA_LOCALE_CATEGORIES= + +# Additional xgettext options to use. Use "\newline" to break lines. +XGETTEXT_OPTIONS='+ --flag=_:1:pass-c-format+ --flag=N_:1:pass-c-format+ --flag=error:3:c-format --flag=error_at_line:5:c-format+' + +# Package bug report address and copyright holder for gettext files +COPYRIGHT_HOLDER='Free Software Foundation, Inc.' +MSGID_BUGS_ADDRESS=bug-$package@gnu.org + +# Files we don't want to import. +excluded_files= + +# File that should exist in the top directory of a checked out hierarchy, +# but not in a distribution tarball. +checkout_only_file=README-hacking + +# Whether to use copies instead of symlinks. +copy=false + +# Set this to '.cvsignore .gitignore' in bootstrap.conf if you want +# those files to be generated in directories like lib/, m4/, and po/. +# Or set it to 'auto' to make this script select which to use based +# on which version control system (if any) is used in the source directory. +vc_ignore=auto + +# find_tool ENVVAR NAMES... +# ------------------------- +# Search for a required program. Use the value of ENVVAR, if set, +# otherwise find the first of the NAMES that can be run (i.e., +# supports --version). If found, set ENVVAR to the program name, +# die otherwise. +find_tool () +{ + find_tool_envvar=$1 + shift + find_tool_names=$@ + eval "find_tool_res=$$find_tool_envvar" + if test x"$find_tool_res" = x; then + for i + do + if ($i --version </dev/null) >/dev/null 2>&1; then + find_tool_res=$i + break + fi + done + else + find_tool_error_prefix="$$find_tool_envvar: " + fi + if test x"$find_tool_res" = x; then + echo >&2 "$0: one of these is required: $find_tool_names" + exit 1 + fi + ($find_tool_res --version </dev/null) >/dev/null 2>&1 || { + echo >&2 "$0: ${find_tool_error_prefix}cannot run $find_tool_res --version" + exit 1 + } + eval "$find_tool_envvar=$find_tool_res" + eval "export $find_tool_envvar" +} + +# Find sha1sum, named gsha1sum on MacPorts, and shasum on MacOS 10.6. +find_tool SHA1SUM sha1sum gsha1sum shasum + +# Override the default configuration, if necessary. +# Make sure that bootstrap.conf is sourced from the current directory +# if we were invoked as "sh bootstrap". +case "$0" in + */*) test -r "$0.conf" && . "$0.conf" ;; + *) test -r "$0.conf" && . ./"$0.conf" ;; +esac + + +if test "$vc_ignore" = auto; then + vc_ignore= + test -d .git && vc_ignore=.gitignore + test -d CVS && vc_ignore="$vc_ignore .cvsignore" +fi + +# Translate configuration into internal form. + +# Parse options. + +for option +do + case $option in + --help) + usage + exit;; + --gnulib-srcdir=*) + GNULIB_SRCDIR=`expr "X$option" : 'X--gnulib-srcdir=(.*)'`;; + --skip-po) + SKIP_PO=t;; + --force) + checkout_only_file=;; + --copy) + copy=true;; + *) + echo >&2 "$0: $option: unknown option" + exit 1;; + esac +done + +if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then + echo "$0: Bootstrapping from a non-checked-out distribution is risky." >&2 + exit 1 +fi + +# If $STR is not already on a line by itself in $FILE, insert it, +# sorting the new contents of the file and replacing $FILE with the result. +insert_sorted_if_absent() { + file=$1 + str=$2 + test -f $file || touch $file + echo "$str" | sort -u - $file | cmp - $file > /dev/null + || echo "$str" | sort -u - $file -o $file + || exit 1 +} + +# Die if there is no AC_CONFIG_AUX_DIR($build_aux) line in configure.ac. +found_aux_dir=no +grep '^[ ]*AC_CONFIG_AUX_DIR(['"$build_aux"'])' configure.ac + >/dev/null && found_aux_dir=yes +grep '^[ ]*AC_CONFIG_AUX_DIR('"$build_aux"')' configure.ac + >/dev/null && found_aux_dir=yes +if test $found_aux_dir = no; then + echo "$0: expected line not found in configure.ac. Add the following:" >&2 + echo " AC_CONFIG_AUX_DIR([$build_aux])" >&2 + exit 1 +fi + +# If $build_aux doesn't exist, create it now, otherwise some bits +# below will malfunction. If creating it, also mark it as ignored. +if test ! -d $build_aux; then + mkdir $build_aux + for dot_ig in x $vc_ignore; do + test $dot_ig = x && continue + insert_sorted_if_absent $dot_ig $build_aux + done +fi + +# Note this deviates from the version comparison in automake +# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a +# but this should suffice as we won't be specifying old +# version formats or redundant trailing .0 in bootstrap.conf. +# If we did want full compatibility then we should probably +# use m4_version_compare from autoconf. +sort_ver() { # sort -V is not generally available + ver1="$1" + ver2="$2" + + # split on '.' and compare each component + i=1 + while : ; do + p1=$(echo "$ver1" | cut -d. -f$i) + p2=$(echo "$ver2" | cut -d. -f$i) + if [ ! "$p1" ]; then + echo "$1 $2" + break + elif [ ! "$p2" ]; then + echo "$2 $1" + break + elif [ ! "$p1" = "$p2" ]; then + if [ "$p1" -gt "$p2" ] 2>/dev/null; then # numeric comparison + echo "$2 $1" + elif [ "$p2" -gt "$p1" ] 2>/dev/null; then # numeric comparison + echo "$1 $2" + else # numeric, then lexicographic comparison + lp=$(printf "$p1n$p2n" | LANG=C sort -n | tail -n1) + if [ "$lp" = "$p2" ]; then + echo "$1 $2" + else + echo "$2 $1" + fi + fi + break + fi + i=$(($i+1)) + done +} + +get_version() { + app=$1 + + $app --version >/dev/null 2>&1 || return 1 + + $app --version 2>&1 | + sed -n '# extract version within line + s/.*[v ]{1,}([0-9]{1,}.[.a-z0-9-]*).*/1/ + t done + + # extract version at start of line + s/^([0-9]{1,}.[.a-z0-9-]*).*/1/ + t done + + d + + :done + #the following essentially does s/5.005/5.5/ + s/.0*([1-9])/.1/g + p + q' +} + +check_versions() { + ret=0 + + while read app req_ver; do + # Honor $APP variables ($TAR, $AUTOCONF, etc.) + appvar=`echo $app | tr '[a-z]' '[A-Z]'` + test "$appvar" = TAR && appvar=AMTAR + eval "app=${$appvar-$app}" + inst_ver=$(get_version $app) + if [ ! "$inst_ver" ]; then + echo "Error: '$app' not found" >&2 + ret=1 + elif [ ! "$req_ver" = "-" ]; then + latest_ver=$(sort_ver $req_ver $inst_ver | cut -d' ' -f2) + if [ ! "$latest_ver" = "$inst_ver" ]; then + echo "Error: '$app' version == $inst_ver is too old" >&2 + echo " '$app' version >= $req_ver is required" >&2 + ret=1 + fi + fi + done + + return $ret +} + +print_versions() { + echo "Program Min_version" + echo "----------------------" + printf "$buildreq" + echo "----------------------" + # can't depend on column -t +} + +if ! printf "$buildreq" | check_versions; then + test -f README-prereq && + echo "See README-prereq for notes on obtaining these prerequisite programs:" >&2 + echo + print_versions + exit 1 +fi + +echo "$0: Bootstrapping from checked-out $package sources..." + +# See if we can use gnulib's git-merge-changelog merge driver. +if test -d .git && (git --version) >/dev/null 2>/dev/null ; then + if git config merge.merge-changelog.driver >/dev/null ; then + : + elif (git-merge-changelog --version) >/dev/null 2>/dev/null ; then + echo "initializing git-merge-changelog driver" + git config merge.merge-changelog.name 'GNU-style ChangeLog merge driver' + git config merge.merge-changelog.driver 'git-merge-changelog %O %A %B' + else + echo "consider installing git-merge-changelog from gnulib" + fi +fi + + +cleanup_gnulib() { + status=$? + rm -fr "$gnulib_path" + exit $status +} + +git_modules_config () { + test -f .gitmodules && git config --file .gitmodules "$@" +} + +gnulib_path=`git_modules_config submodule.gnulib.path` +: ${gnulib_path=gnulib} + +# Get gnulib files. + +case ${GNULIB_SRCDIR--} in +-) + if git_modules_config submodule.gnulib.url >/dev/null; then + echo "$0: getting gnulib files..." + git submodule init || exit $? + git submodule update || exit $? + + elif [ ! -d "$gnulib_path" ]; then + echo "$0: getting gnulib files..." + + trap cleanup_gnulib 1 2 13 15 + + 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 + + trap - 1 2 13 15 + fi + GNULIB_SRCDIR=$gnulib_path + ;; +*) + # Use GNULIB_SRCDIR as a reference. + if test -d "$GNULIB_SRCDIR"/.git && + git_modules_config submodule.gnulib.url >/dev/null; then + echo "$0: getting gnulib files..." + if git submodule -h|grep -- --reference > /dev/null; then + # Prefer the one-liner available in git 1.6.4 or newer. + git submodule update --init --reference "$GNULIB_SRCDIR" + "$gnulib_path" || exit $? + else + # This fallback allows at least git 1.5.5. + if test -f "$gnulib_path"/gnulib-tool; then + # Since file already exists, assume submodule init already complete. + git submodule update || exit $? + else + # Older git can't clone into an empty directory. + rmdir "$gnulib_path" 2>/dev/null + git clone --reference "$GNULIB_SRCDIR" + "$(git_modules_config submodule.gnulib.url)" "$gnulib_path" + && git submodule init && git submodule update + || exit $? + fi + fi + GNULIB_SRCDIR=$gnulib_path + fi + ;; +esac + +gnulib_tool=$GNULIB_SRCDIR/gnulib-tool +<$gnulib_tool || exit + +# Get translations. + +download_po_files() { + subdir=$1 + domain=$2 + echo "$0: getting translations into $subdir for $domain..." + cmd=`printf "$po_download_command_format" "$domain" "$subdir"` + eval "$cmd" +} + +# Mirror .po files to $po_dir/.reference and copy only the new +# or modified ones into $po_dir. Also update $po_dir/LINGUAS. +# Note po files that exist locally only are left in $po_dir but will +# not be included in LINGUAS and hence will not be distributed. +update_po_files() { + # Directory containing primary .po files. + # Overwrite them only when we're sure a .po file is new. + po_dir=$1 + domain=$2 + + # Mirror *.po files into this dir. + # Usually contains *.s1 checksum files. + ref_po_dir="$po_dir/.reference" + + test -d $ref_po_dir || mkdir $ref_po_dir || return + download_po_files $ref_po_dir $domain + && ls "$ref_po_dir"/*.po 2>/dev/null | + sed 's|.*/||; s|.po$||' > "$po_dir/LINGUAS" || return + + langs=`cd $ref_po_dir && echo *.po|sed 's/.po//g'` + test "$langs" = '*' && langs=x + for po in $langs; do + case $po in x) continue;; esac + new_po="$ref_po_dir/$po.po" + cksum_file="$ref_po_dir/$po.s1" + if ! test -f "$cksum_file" || + ! test -f "$po_dir/$po.po" || + ! $SHA1SUM -c --status "$cksum_file" + < "$new_po" > /dev/null; then + echo "updated $po_dir/$po.po..." + cp "$new_po" "$po_dir/$po.po" + && $SHA1SUM < "$new_po" > "$cksum_file" + fi + done +} + +case $SKIP_PO in +'') + if test -d po; then + update_po_files po $package || exit + fi + + if test -d runtime-po; then + update_po_files runtime-po $package-runtime || exit + fi;; +esac + +symlink_to_dir() +{ + src=$1/$2 + dst=${3-$2} + + test -f "$src" && { + + # If the destination directory doesn't exist, create it. + # This is required at least for "lib/uniwidth/cjk.h". + dst_dir=`dirname "$dst"` + if ! test -d "$dst_dir"; then + mkdir -p "$dst_dir" + + # If we've just created a directory like lib/uniwidth, + # tell version control system(s) it's ignorable. + # FIXME: for now, this does only one level + parent=`dirname "$dst_dir"` + for dot_ig in x $vc_ignore; do + test $dot_ig = x && continue + ig=$parent/$dot_ig + insert_sorted_if_absent $ig `echo "$dst_dir"|sed 's,.*/,,'` + done + fi + + if $copy; then + { + test ! -h "$dst" || { + echo "$0: rm -f $dst" && + rm -f "$dst" + } + } && + test -f "$dst" && + cmp -s "$src" "$dst" || { + echo "$0: cp -fp $src $dst" && + cp -fp "$src" "$dst" + } + else + test -h "$dst" && + src_ls=`ls -diL "$src" 2>/dev/null` && set $src_ls && src_i=$1 && + dst_ls=`ls -diL "$dst" 2>/dev/null` && set $dst_ls && dst_i=$1 && + test "$src_i" = "$dst_i" || { + dot_dots= + case $src in + /*) ;; + *) + case /$dst/ in + *//* | */../* | */./* | /*/*/*/*/*/) + echo >&2 "$0: invalid symlink calculation: $src -> $dst" + exit 1;; + /*/*/*/*/) dot_dots=../../../;; + /*/*/*/) dot_dots=../../;; + /*/*/) dot_dots=../;; + esac;; + esac + + echo "$0: ln -fs $dot_dots$src $dst" && + ln -fs "$dot_dots$src" "$dst" + } + fi + } +} + +cp_mark_as_generated() +{ + cp_src=$1 + cp_dst=$2 + + if cmp -s "$cp_src" "$GNULIB_SRCDIR/$cp_dst"; then + symlink_to_dir "$GNULIB_SRCDIR" "$cp_dst" + elif cmp -s "$cp_src" "$local_gl_dir/$cp_dst"; then + symlink_to_dir $local_gl_dir "$cp_dst" + else + case $cp_dst in + *.[ch]) c1='/* '; c2=' */';; + *.texi) c1='@c '; c2= ;; + *.m4|*/Make*|Make*) c1='# ' ; c2= ;; + *) c1= ; c2= ;; + esac + + # If the destination directory doesn't exist, create it. + # This is required at least for "lib/uniwidth/cjk.h". + dst_dir=`dirname "$cp_dst"` + test -d "$dst_dir" || mkdir -p "$dst_dir" + + if test -z "$c1"; then + cmp -s "$cp_src" "$cp_dst" || { + # Copy the file first to get proper permissions if it + # doesn't already exist. Then overwrite the copy. + echo "$0: cp -f $cp_src $cp_dst" && + rm -f "$cp_dst" && + cp "$cp_src" "$cp_dst-t" && + sed "s!$bt_regex/!!g" "$cp_src" > "$cp_dst-t" && + mv -f "$cp_dst-t" "$cp_dst" + } + else + # Copy the file first to get proper permissions if it + # doesn't already exist. Then overwrite the copy. + cp "$cp_src" "$cp_dst-t" && + ( + echo "$c1-*- buffer-read-only: t -*- vi: set ro:$c2" && + echo "${c1}DO NOT EDIT! GENERATED AUTOMATICALLY!$c2" && + sed "s!$bt_regex/!!g" "$cp_src" + ) > $cp_dst-t && + if cmp -s "$cp_dst-t" "$cp_dst"; then + rm -f "$cp_dst-t" + else + echo "$0: cp $cp_src $cp_dst # with edits" && + mv -f "$cp_dst-t" "$cp_dst" + fi + fi + fi +} + +version_controlled_file() { + dir=$1 + file=$2 + found=no + if test -d CVS; then + grep -F "/$file/" $dir/CVS/Entries 2>/dev/null | + grep '^/[^/]*/[0-9]' > /dev/null && found=yes + elif test -d .git; then + git rm -n "$dir/$file" > /dev/null 2>&1 && found=yes + elif test -d .svn; then + svn log -r HEAD "$dir/$file" > /dev/null 2>&1 && found=yes + else + echo "$0: no version control for $dir/$file?" >&2 + fi + test $found = yes +} + +slurp() { + for dir in . `(cd $1 && find * -type d -print)`; do + copied= + sep= + for file in `ls -a $1/$dir`; do + case $file in + .|..) continue;; + .*) continue;; # FIXME: should all file names starting with "." be ignored? + esac + test -d $1/$dir/$file && continue + for excluded_file in $excluded_files; do + test "$dir/$file" = "$excluded_file" && continue 2 + done + if test $file = Makefile.am && test "X$gnulib_mk" != XMakefile.am; then + copied=$copied${sep}$gnulib_mk; sep=$nl + remove_intl='/^[^#].*/intl/s/^/#/;'"s!$bt_regex/!!g" + sed "$remove_intl" $1/$dir/$file | cmp - $dir/$gnulib_mk > /dev/null || { + echo "$0: Copying $1/$dir/$file to $dir/$gnulib_mk ..." && + rm -f $dir/$gnulib_mk && + sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk + } + elif { test "${2+set}" = set && test -r $2/$dir/$file; } || + version_controlled_file $dir $file; then + echo "$0: $dir/$file overrides $1/$dir/$file" + else + copied=$copied$sep$file; sep=$nl + if test $file = gettext.m4; then + echo "$0: patching m4/gettext.m4 to remove need for intl/* ..." + rm -f $dir/$file + sed ' + /^AC_DEFUN([AM_INTL_SUBDIR],/,/^]/c+ AC_DEFUN([AM_INTL_SUBDIR], []) + /^AC_DEFUN([gt_INTL_SUBDIR_CORE],/,/^]/c+ AC_DEFUN([gt_INTL_SUBDIR_CORE], []) + $a+ AC_DEFUN([gl_LOCK_EARLY], []) + ' $1/$dir/$file >$dir/$file + else + cp_mark_as_generated $1/$dir/$file $dir/$file + fi + fi || exit + done + + for dot_ig in x $vc_ignore; do + test $dot_ig = x && continue + ig=$dir/$dot_ig + if test -n "$copied"; then + insert_sorted_if_absent $ig "$copied" + # If an ignored file name ends with .in.h, then also add + # the name with just ".h". Many gnulib headers are generated, + # e.g., stdint.in.h -> stdint.h, dirent.in.h ->..., etc. + # Likewise for .gperf -> .h, .y -> .c, and .sin -> .sed + f=`echo "$copied"|sed 's/.in.h$/.h/;s/.sin$/.sed/;s/.y$/.c/;s/.gperf$/.h/'` + insert_sorted_if_absent $ig "$f" + + # For files like sys_stat.in.h and sys_time.in.h, record as + # ignorable the directory we might eventually create: sys/. + f=`echo "$copied"|sed 's/sys_.*.in.h$/sys/'` + insert_sorted_if_absent $ig "$f" + fi + done + done +} + + +# Create boot temporary directories to import from gnulib and gettext. +rm -fr $bt $bt2 && +mkdir $bt $bt2 || exit + +# Import from gnulib. + +gnulib_tool_options="+ --import+ --no-changelog+ --aux-dir $bt/$build_aux+ --doc-base $bt/$doc_base+ --lib $gnulib_name+ --m4-base $bt/$m4_base/+ --source-base $bt/$source_base/+ --tests-base $bt/$tests_base+ --local-dir $local_gl_dir+ $gnulib_tool_option_extras+" +echo "$0: $gnulib_tool $gnulib_tool_options --import ..." +$gnulib_tool $gnulib_tool_options --import $gnulib_modules && +slurp $bt || exit + +for file in $gnulib_files; do + symlink_to_dir "$GNULIB_SRCDIR" $file || exit +done + + +# Import from gettext. +with_gettext=yes +grep '^[ ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || + with_gettext=no + +if test $with_gettext = yes; then + echo "$0: (cd $bt2; ${AUTOPOINT-autopoint}) ..." + cp configure.ac $bt2 && + (cd $bt2 && ${AUTOPOINT-autopoint} && rm configure.ac) && + slurp $bt2 $bt || exit +fi +rm -fr $bt $bt2 || exit + +# Remove any dangling symlink matching "*.m4" or "*.[ch]" in some +# gnulib-populated directories. Such .m4 files would cause aclocal to fail. +# The following requires GNU find 4.2.3 or newer. Considering the usual +# portability constraints of this script, that may seem a very demanding +# requirement, but it should be ok. Ignore any failure, which is fine, +# since this is only a convenience to help developers avoid the relatively +# unusual case in which a symlinked-to .m4 file is git-removed from gnulib +# between successive runs of this script. +find "$m4_base" "$source_base" + -depth ( -name '*.m4' -o -name '*.[ch]' ) + -type l -xtype l -delete > /dev/null 2>&1 + +# Reconfigure, getting other files. + +# Skip autoheader if it's not needed. +grep -E '^[ ]*AC_CONFIG_HEADERS?>' configure.ac >/dev/null || + AUTOHEADER=true + +for command in + libtool + "${ACLOCAL-aclocal} --force -I m4" + "${AUTOCONF-autoconf} --force" + "${AUTOHEADER-autoheader} --force" + "${AUTOMAKE-automake} --add-missing --copy --force-missing" +do + if test "$command" = libtool; then + use_libtool=0 + # We'd like to use grep -E, to see if any of LT_INIT, + # AC_PROG_LIBTOOL, AM_PROG_LIBTOOL is used in configure.ac, + # but that's not portable enough (e.g., for Solaris). + grep '^[ ]*A[CM]_PROG_LIBTOOL' configure.ac >/dev/null + && use_libtool=1 + grep '^[ ]*LT_INIT' configure.ac >/dev/null + && use_libtool=1 + test $use_libtool = 0 + && continue + command="${LIBTOOLIZE-libtoolize} -c -f" + fi + echo "$0: $command ..." + $command || exit +done + + +# Get some extra files from gnulib, overriding existing files. +for file in $gnulib_extra_files; do + case $file in + */INSTALL) dst=INSTALL;; + build-aux/*) dst=$build_aux/`expr "$file" : 'build-aux/(.*)'`;; + *) dst=$file;; + esac + symlink_to_dir "$GNULIB_SRCDIR" $file $dst || exit +done + +if test $with_gettext = yes; then + # Create gettext configuration. + echo "$0: Creating po/Makevars from po/Makevars.template ..." + rm -f po/Makevars + sed ' + /^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/ + /^COPYRIGHT_HOLDER *=/s/=.*/= '"$COPYRIGHT_HOLDER"'/ + /^MSGID_BUGS_ADDRESS *=/s|=.*|= '"$MSGID_BUGS_ADDRESS"'| + /^XGETTEXT_OPTIONS *=/{ + s/$/ / + a+ '"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+} + } + ' po/Makevars.template >po/Makevars || exit 1 + + if test -d runtime-po; then + # Similarly for runtime-po/Makevars, but not quite the same. + rm -f runtime-po/Makevars + sed ' + /^DOMAIN *=.*/s/=.*/= '"$package"'-runtime/ + /^subdir *=.*/s/=.*/= runtime-po/ + /^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/ + /^XGETTEXT_OPTIONS *=/{ + s/$/ / + a+ '"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+} + } + ' po/Makevars.template >runtime-po/Makevars || exit 1 + + # Copy identical files from po to runtime-po. + (cd po && cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po) + fi +fi + +bootstrap_epilogue + +echo "$0: done. Now you can run './configure'." + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/bootstrap.conf b/bootstrap.conf new file mode 100644 index 0000000..d1fbb3a --- /dev/null +++ b/bootstrap.conf @@ -0,0 +1,96 @@ +# Bootstrap configuration. + +# Copyright (C) 2006-2010 Free Software Foundation, Inc. + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. + + +# gnulib modules used by this package. +gnulib_modules=' +announce-gen +c-ctype +closeout +dirname +do-release-commit-and-tag +error +getopt-gnu +gettext-h +git-version-gen +gitlog-to-changelog +gnu-web-doc-update +gnupload +malloc-gnu +maintainer-makefile +manywarnings +progname +quotearg +realloc-gnu +ssize_t +stddef +stdlib +stpcpy +strerror +string +strtol +strtoul +strtoull +strtoumax +unistd +unlocked-io +update-copyright +useless-if-before-free +version-etc-fsf +xalloc +xstrtoumax +' + +gnulib_name=libiwhd + +checkout_only_file= +MSGID_BUGS_ADDRESS=iwhd-devel@fedorahosted.org + +# Additional xgettext options to use. Use "\newline" to break lines. +XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'+ --from-code=UTF-8+ --flag=asprintf:2:c-format --flag=vasprintf:2:c-format+ --flag=asnprintf:3:c-format --flag=vasnprintf:3:c-format+ --flag=wrapf:1:c-format+ --flag=error:3:c-format --flag=error_at_line:5:c-format+' + +# Automake requires that ChangeLog exist. +test -f ChangeLog || touch ChangeLog || exit 1 + +gnulib_tool_option_extras="--tests-base=$bt/gnulib-tests --with-tests" + +# Build prerequisites +buildreq="+autoconf 2.62 +automake 1.11.1 +autopoint - +gettext - +git 1.4.4 +gzip - +makeinfo - +rsync - +tar - +" + +bootstrap_epilogue() +{ + # Change paths in gnulib-tests/gnulib.mk from "../.." to "..". + m=gnulib-tests/gnulib.mk + sed 's,../..,..,g' $m > $m-t + mv -f $m-t $m +} diff --git a/cfg.mk b/cfg.mk new file mode 100644 index 0000000..d92f4ce --- /dev/null +++ b/cfg.mk @@ -0,0 +1,73 @@ +# Customize maint.mk -*- makefile -*- +# Copyright (C) 2009-2010 Free Software Foundation, Inc. + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. + +# Used in maint.mk's web-manual rule +manual_title = GNU Grep: Print lines matching a pattern + +# Fixing these can wait. +skip_low_priority = + sc_bindtextdomain + sc_texinfo_acronym + sc_prohibit_atoi_atof + sc_prohibit_tab_based_indentation + sc_prohibit_strcmp + sc_unmarked_diagnostics + sc_error_message_uppercase + sc_file_system + +# Tests not to run as part of "make distcheck". +local-checks-to-skip = + sc_m4_quote_check + sc_program_name + sc_prohibit_assert_without_use + sc_prohibit_echo_minus_en + sc_prohibit_empty_lines_at_EOF + sc_prohibit_getopt_without_use + sc_prohibit_test_minus_ao + sc_prohibit_strings_without_use + sc_space_tab + sc_trailing_blank + sc_useless_cpp_parens + $(skip_low_priority) + +# Tools used to bootstrap this package, used for "announcement". +bootstrap-tools = autoconf,automake,gnulib + +# Now that we have better tests, make this the default. +export VERBOSE = yes + +old_NEWS_hash = d41d8cd98f00b204e9800998ecf8427e + +sc_prohibit_echo_minus_en: + @prohibit='<echo -[en]' + halt='do not use echo ''-e or echo ''-n; use printf instead' + $(_sc_search_regexp) + +# Indent only with spaces. +sc_prohibit_tab_based_indentation: + @prohibit='^ * ' + halt='TAB in indentation; use only spaces' + $(_sc_search_regexp) + +# Don't use "indent-tabs-mode: nil" anymore. No longer needed. +sc_prohibit_emacs__indent_tabs_mode__setting: + @prohibit='^( *[*#] *)?indent-tabs-mode:' + halt='use of emacs indent-tabs-mode: setting' + $(_sc_search_regexp) + +update-copyright-env = + UPDATE_COPYRIGHT_USE_INTERVALS=1 + UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79 diff --git a/configure.ac b/configure.ac index 83bebcf..2e1e5a1 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,9 @@ # along with this program. If not, see http://www.gnu.org/licenses/.
AC_PREREQ([2.65]) -AC_INIT([iwhd], [1.0], [iwhd-devel@fedorahosted.org]) +AC_INIT([iwhd], + m4_esyscmd([build-aux/git-version-gen .tarball-version]), + [iwhd-devel@fedorahosted.org]) AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([config.h:config.hin]) @@ -28,6 +30,12 @@ AM_SILENT_RULES([yes]) # make --enable-silent-rules the default. AC_PROG_CXX AC_PROG_CC AM_PROG_CC_C_O +gl_EARLY +AC_PROG_RANLIB +AC_TYPE_UINT64_T + +gl_INIT + AC_PROG_YACC AC_PROG_LEX AM_MISSING_PROG([HELP2MAN], [help2man]) @@ -71,22 +79,11 @@ AX_BOOST_BASE AX_BOOST_SYSTEM AX_BOOST_THREAD
-# Checks for header files. -AC_CHECK_HEADERS([fcntl.h stdint.h stdlib.h string.h strings.h sys/time.h unistd.h]) - -# Checks for typedefs, structures, and compiler characteristics. -AC_HEADER_STDBOOL -AC_TYPE_SIZE_T -AC_TYPE_UINT64_T - -# Checks for library functions. -AC_FUNC_MALLOC -AC_FUNC_REALLOC -AC_CHECK_FUNCS([gettimeofday memmove memset strcasecmp strdup strndup strtoul]) - AC_CONFIG_FILES([ Makefile -t/Makefile +gnulib-tests/Makefile +lib/Makefile man/Makefile +t/Makefile ]) AC_OUTPUT diff --git a/doc/.gitignore b/doc/.gitignore new file mode 100644 index 0000000..df37308 --- /dev/null +++ b/doc/.gitignore @@ -0,0 +1 @@ +gendocs_template diff --git a/gnulib b/gnulib new file mode 160000 index 0000000..cc98e1e --- /dev/null +++ b/gnulib @@ -0,0 +1 @@ +Subproject commit cc98e1ec101be0b8d260025b5e40bfec7f4b1ac5 diff --git a/gnulib-tests/.gitignore b/gnulib-tests/.gitignore new file mode 100644 index 0000000..1c5d7c6 --- /dev/null +++ b/gnulib-tests/.gitignore @@ -0,0 +1,97 @@ +alloca.h +alloca.in.h +binary-io.h +dup2.c +fcntl.h +fcntl.in.h +getpagesize.c +gnulib.mk +ignore-value.h +init.sh +lstat.c +macros.h +malloca.c +malloca.h +malloca.valgrind +open.c +pathmax.h +putenv.c +same-inode.h +setenv.c +signature.h +stat.c +symlink.c +sys +sys_stat.h +sys_stat.in.h +test-alloca-opt.c +test-binary-io.c +test-binary-io.sh +test-c-ctype.c +test-dirname.c +test-dup2.c +test-environ.c +test-errno.c +test-fcntl-h.c +test-fpending.c +test-fpending.sh +test-getopt.c +test-getopt.h +test-getopt_long.h +test-inttypes.c +test-lstat.c +test-lstat.h +test-malloc-gnu.c +test-malloca.c +test-mbrtowc.c +test-mbrtowc1.sh +test-mbrtowc2.sh +test-mbrtowc3.sh +test-mbrtowc4.sh +test-mbsinit.c +test-mbsinit.sh +test-memchr.c +test-open.c +test-open.h +test-quotearg-simple.c +test-quotearg.h +test-realloc-gnu.c +test-setenv.c +test-stat.c +test-stat.h +test-stdbool.c +test-stddef.c +test-stdint.c +test-stdlib.c +test-strerror.c +test-string.c +test-strnlen.c +test-symlink.c +test-symlink.h +test-sys_stat.c +test-sys_wait.c +test-sys_wait.h +test-time.c +test-unistd.c +test-unsetenv.c +test-update-copyright.sh +test-vc-list-files-cvs.sh +test-vc-list-files-git.sh +test-verify.c +test-verify.sh +test-version-etc.c +test-version-etc.sh +test-wchar.c +test-wctype.c +test-xalloc-die.c +test-xalloc-die.sh +test-xstrtol.c +test-xstrtol.sh +test-xstrtoul.c +test-xstrtoumax.c +test-xstrtoumax.sh +time.h +time.in.h +unsetenv.c +wctob.c +zerosize-ptr.h diff --git a/gnulib-tests/Makefile.am b/gnulib-tests/Makefile.am new file mode 100644 index 0000000..c3a48e8 --- /dev/null +++ b/gnulib-tests/Makefile.am @@ -0,0 +1,3 @@ +include gnulib.mk + +AM_CFLAGS = $(GNULIB_WARN_CFLAGS) # $(WERROR_CFLAGS) diff --git a/lib/.gitignore b/lib/.gitignore new file mode 100644 index 0000000..8d76533 --- /dev/null +++ b/lib/.gitignore @@ -0,0 +1,94 @@ +basename-lgpl.c +basename.c +c-ctype.c +c-ctype.h +close-stream.c +close-stream.h +closeout.c +closeout.h +config.charset +dirname-lgpl.c +dirname.c +dirname.h +errno.h +errno.in.h +error.c +error.h +exitfail.c +exitfail.h +fpending.c +fpending.h +getopt.c +getopt.h +getopt.in.h +getopt1.c +getopt_int.h +gettext.h +gnulib.mk +intprops.h +inttypes.h +inttypes.in.h +localcharset.c +localcharset.h +malloc.c +mbrtowc.c +mbsinit.c +memchr.c +memchr.valgrind +progname.c +progname.h +quotearg.c +quotearg.h +realloc.c +ref-add.sed +ref-add.sin +ref-del.sed +ref-del.sin +stdarg.h +stdarg.in.h +stdbool.h +stdbool.in.h +stddef.h +stddef.in.h +stdint.h +stdint.in.h +stdlib.h +stdlib.in.h +stpcpy.c +streq.h +strerror.c +string.h +string.in.h +stripslash.c +strndup.c +strnlen.c +strtoimax.c +strtol.c +strtoll.c +strtoul.c +strtoull.c +strtoumax.c +sys +sys_wait.h +sys_wait.in.h +unistd.h +unistd.in.h +unlocked-io.h +verify.h +version-etc-fsf.c +version-etc.c +version-etc.h +wchar.h +wchar.in.h +wctype.h +wctype.in.h +xalloc-die.c +xalloc.h +xmalloc.c +xstrndup.c +xstrndup.h +xstrtol-error.c +xstrtol.c +xstrtol.h +xstrtoul.c +xstrtoumax.c diff --git a/lib/Makefile.am b/lib/Makefile.am new file mode 100644 index 0000000..7871533 --- /dev/null +++ b/lib/Makefile.am @@ -0,0 +1,23 @@ +## Makefile for gnulib/lib -*-Makefile-*- + +# Copyright (C) 1995-2007, 2009-2010 Free Software Foundation, Inc. + +## This program is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program. If not, see http://www.gnu.org/licenses/. + +include gnulib.mk + +AM_CFLAGS += $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS) + +libiwhd_a_LIBADD += $(LIBOBJS) +libiwhd_a_DEPENDENCIES += $(LIBOBJS) diff --git a/ax/ax_boost_base.m4 b/m4/ax_boost_base.m4 similarity index 100% rename from ax/ax_boost_base.m4 rename to m4/ax_boost_base.m4 diff --git a/ax/ax_boost_system.m4 b/m4/ax_boost_system.m4 similarity index 100% rename from ax/ax_boost_system.m4 rename to m4/ax_boost_system.m4 diff --git a/ax/ax_boost_thread.m4 b/m4/ax_boost_thread.m4 similarity index 100% rename from ax/ax_boost_thread.m4 rename to m4/ax_boost_thread.m4 diff --git a/rest.c b/rest.c index cc75f68..8c1860c 100644 --- a/rest.c +++ b/rest.c @@ -975,7 +975,7 @@ root_blob_generator (void *ctx, uint64_t pos, char *buf, size_t max) } ms->cleanup |= CLEANUP_TMPL; ms->gen_ctx->base = host; - len = tmpl_root_header(ms->gen_ctx,"image_warehouse","1.0"); + len = tmpl_root_header(ms->gen_ctx,"image_warehouse",VERSION); if (!len) { return -1; }
-----------------------------------------------------------------------
repo.or.cz automatic notification. Contact project admin jim@meyering.net if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.
iwhd-commit@lists.fedorahosted.org