libbsd: Branch 'master' - 4 commits

Guillem Jover guillem at kemper.freedesktop.org
Wed Jun 27 00:28:54 PDT 2012


 configure.ac     |    8 ++++++++
 man/flopen.3     |    4 ++--
 man/pidfile.3    |    4 ++--
 src/Makefile.am  |    5 +----
 test/Makefile.am |    3 ---
 5 files changed, 13 insertions(+), 11 deletions(-)

New commits:
commit 918a4dba4a35fdc241381a2ff9f1e697653adf88
Author: Guillem Jover <guillem at hadrons.org>
Date:   Wed Jun 27 09:15:15 2012 +0200

    Release libbsd 0.4.2

diff --git a/src/Makefile.am b/src/Makefile.am
index 46b946b..8b2b91a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -34,7 +34,7 @@ libbsd_la_DEPENDENCIES = \
 	libbsd.map
 libbsd_la_LDFLAGS = \
 	-Wl,--version-script=$(srcdir)/libbsd.map \
-	-version-number 0:4:1
+	-version-number 0:4:2
 libbsd_la_SOURCES = \
 	arc4random.c \
 	bsd_getopt.c \
commit 444bd1fbb8f53047b1ee2b69dc4a8eb65537bc68
Author: Guillem Jover <guillem at hadrons.org>
Date:   Thu Jun 21 10:16:14 2012 +0200

    man: Use minus signs and hyphens consistently
    
    Any string that can be copy & pasted into a terminal, for example,
    needs to correctly use minus signs (escaped dashes), instead of the
    default hyphen.

diff --git a/man/flopen.3 b/man/flopen.3
index 9847436..f430dc0 100644
--- a/man/flopen.3
+++ b/man/flopen.3
@@ -84,7 +84,7 @@ includes
 If successful,
 .Fn flopen
 returns a valid file descriptor.
-Otherwise, it returns -1, and sets
+Otherwise, it returns \-1, and sets
 .Va errno
 as described in
 .Xr flock 2
diff --git a/man/pidfile.3 b/man/pidfile.3
index 7b2697d..e7eaf3f 100644
--- a/man/pidfile.3
+++ b/man/pidfile.3
@@ -126,7 +126,7 @@ if (pfh == NULL) {
 	warn("Cannot open or create pidfile");
 }
 
-if (daemon(0, 0) == -1) {
+if (daemon(0, 0) == \-1) {
 	warn("Cannot daemonize");
 	pidfile_remove(pfh);
 	exit(EXIT_FAILURE);
@@ -138,7 +138,7 @@ for (;;) {
 	/* Do work. */
 	childpid = fork();
 	switch (childpid) {
-	case -1:
+	case \-1:
 		syslog(LOG_ERR, "Cannot fork(): %s.", strerror(errno));
 		break;
 	case 0:
commit 1d69ae1cd56855b0e9cf5c40f24854f77d9009ca
Author: Guillem Jover <guillem at hadrons.org>
Date:   Mon Jun 4 05:47:26 2012 +0200

    man: Recode flopen(3) to UTF-8
    
    Spotted-by: Eric Smith <eric at brouhaha.com>

diff --git a/man/flopen.3 b/man/flopen.3
index 97a6260..9847436 100644
--- a/man/flopen.3
+++ b/man/flopen.3
@@ -1,5 +1,5 @@
 .\"-
-.\" Copyright (c) 2007 Dag-Erling Coïdan Smørgrav
+.\" Copyright (c) 2007 Dag-Erling Coïdan Smørgrav
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
commit 14524b545d7b3f3f8c01405e9ef5ba45d438424c
Author: Guillem Jover <guillem at hadrons.org>
Date:   Sun Jun 3 07:39:42 2012 +0200

    build: Set default compiler variables from configure
    
    This centralizes the setting so there's no duplication anymore,
    makes sure the user supplied variables are never overridden, and
    are only set when using gcc.
    
    Reported-by: Samuli Suominen <ssuominen at gentoo.org>

diff --git a/configure.ac b/configure.ac
index 54da101..063bf92 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,6 +11,9 @@ AM_INIT_AUTOMAKE([1.8 foreign nostdinc])
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
                             [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
 
+# Check and store if we got user supplied variables
+user_CFLAGS=${CFLAGS-unset}
+
 # Checks for operating system services and capabilities.
 AC_USE_SYSTEM_EXTENSIONS
 AC_SYS_LARGEFILE
@@ -22,6 +25,11 @@ AC_PROG_CC
 AC_PROG_INSTALL
 AC_PROG_LN_S
 
+# Set default compiler variables
+if test "$user_CFLAGS" = unset && test "$GCC" = yes; then
+  CFLAGS="$CFLAGS -Wall -Wextra -Wno-unused-variable -Wno-unused-parameter"
+fi
+
 # Checks for libraries.
 
 # Checks for header files.
diff --git a/src/Makefile.am b/src/Makefile.am
index 4c57136..46b946b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,8 +1,5 @@
 ## Process this file with automake to produce Makefile.in
 
-# Set default values for user variables
-CFLAGS = -Wall -Wextra -Wno-unused-variable -Wno-unused-parameter
-
 AM_CPPFLAGS = \
 	-I$(top_builddir) \
 	-isystem $(top_srcdir)/include/bsd/ \
diff --git a/test/Makefile.am b/test/Makefile.am
index f280136..1d41b86 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,8 +1,5 @@
 ## Process this file with automake to produce Makefile.in
 
-# Set default values for user variables
-CFLAGS = -Wall -Wextra -Wno-unused-variable -Wno-unused-parameter
-
 AM_CPPFLAGS = \
 	-I$(top_builddir) \
 	-isystem $(top_srcdir)/include/bsd/ \


More information about the libbsd mailing list