summaryrefslogtreecommitdiffstats
path: root/sys-utils
diff options
context:
space:
mode:
authorFabian Groffen2011-01-25 22:44:52 +0100
committerKarel Zak2011-02-14 17:45:24 +0100
commiteb76ca98b0733754d7e9a40f754e89b50af2bf06 (patch)
treef2becaf31f77a664256273e6ec6772904422ac53 /sys-utils
parentsfdisk: rename warn to my_warn (diff)
downloadkernel-qcow2-util-linux-eb76ca98b0733754d7e9a40f754e89b50af2bf06.tar.gz
kernel-qcow2-util-linux-eb76ca98b0733754d7e9a40f754e89b50af2bf06.tar.xz
kernel-qcow2-util-linux-eb76ca98b0733754d7e9a40f754e89b50af2bf06.zip
build-sys: provide alternatives for err, errx, warn and warnx
Solaris lacks err, errx, warn and warnx. This also means the err.h header doesn't exist. Removed err.h include from all files, and included err.h from c.h instead if it exists, otherwise alternatives are provided. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'sys-utils')
-rw-r--r--sys-utils/ctrlaltdel.c2
-rw-r--r--sys-utils/fallocate.c2
-rw-r--r--sys-utils/fsfreeze.c1
-rw-r--r--sys-utils/fstrim.c2
-rw-r--r--sys-utils/ipcmk.c2
-rw-r--r--sys-utils/ipcs.c2
-rw-r--r--sys-utils/ldattach.c1
-rw-r--r--sys-utils/lscpu.c2
-rw-r--r--sys-utils/renice.c2
-rw-r--r--sys-utils/rtcwake.c2
-rw-r--r--sys-utils/switch_root.c2
-rw-r--r--sys-utils/unshare.c2
12 files changed, 10 insertions, 12 deletions
diff --git a/sys-utils/ctrlaltdel.c b/sys-utils/ctrlaltdel.c
index cfab79a3e..d6c83b42f 100644
--- a/sys-utils/ctrlaltdel.c
+++ b/sys-utils/ctrlaltdel.c
@@ -5,13 +5,13 @@
* - added Native Language Support
*/
-#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include "linux_reboot.h"
#include "nls.h"
+#include "c.h"
int main(int argc, char *argv[])
{
diff --git a/sys-utils/fallocate.c b/sys-utils/fallocate.c
index e9d7c079a..74e9435fe 100644
--- a/sys-utils/fallocate.c
+++ b/sys-utils/fallocate.c
@@ -30,7 +30,6 @@
#include <stdlib.h>
#include <unistd.h>
#include <getopt.h>
-#include <err.h>
#include <limits.h>
#ifndef HAVE_FALLOCATE
@@ -45,6 +44,7 @@
#include "nls.h"
#include "strutils.h"
+#include "c.h"
static void __attribute__((__noreturn__)) usage(FILE *out)
diff --git a/sys-utils/fsfreeze.c b/sys-utils/fsfreeze.c
index 4ca6e5e2a..2dab23f49 100644
--- a/sys-utils/fsfreeze.c
+++ b/sys-utils/fsfreeze.c
@@ -20,7 +20,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <getopt.h>
-#include <err.h>
#include "blkdev.h"
#include "nls.h"
diff --git a/sys-utils/fstrim.c b/sys-utils/fstrim.c
index 808ff0334..a3a847522 100644
--- a/sys-utils/fstrim.c
+++ b/sys-utils/fstrim.c
@@ -32,7 +32,6 @@
#include <fcntl.h>
#include <limits.h>
#include <getopt.h>
-#include <err.h>
#include <error.h>
#include <errno.h>
@@ -42,6 +41,7 @@
#include "nls.h"
#include "strutils.h"
+#include "c.h"
#ifndef FITRIM
struct fstrim_range {
diff --git a/sys-utils/ipcmk.c b/sys-utils/ipcmk.c
index 2e663bf02..26bf8f6bc 100644
--- a/sys-utils/ipcmk.c
+++ b/sys-utils/ipcmk.c
@@ -23,7 +23,6 @@
#include <stdio.h>
#include <string.h>
#include <errno.h>
-#include <err.h>
#include <time.h>
#include <unistd.h>
@@ -34,6 +33,7 @@
#include <sys/msg.h>
#include "nls.h"
+#include "c.h"
static const char *progname;
diff --git a/sys-utils/ipcs.c b/sys-utils/ipcs.c
index 2ef5788de..533aaeb66 100644
--- a/sys-utils/ipcs.c
+++ b/sys-utils/ipcs.c
@@ -26,7 +26,6 @@
#include <pwd.h>
#include <grp.h>
#include <unistd.h>
-#include <err.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>
@@ -34,6 +33,7 @@
#include <sys/shm.h>
#include "nls.h"
+#include "c.h"
/*-------------------------------------------------------------------*/
/* SHM_DEST and SHM_LOCKED are defined in kernel headers,
diff --git a/sys-utils/ldattach.c b/sys-utils/ldattach.c
index 4fe5a7bb6..5d8381958 100644
--- a/sys-utils/ldattach.c
+++ b/sys-utils/ldattach.c
@@ -23,7 +23,6 @@
#include <errno.h>
#include <termios.h>
#include <unistd.h>
-#include <err.h>
#include "c.h"
#include "nls.h"
diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c
index d59d2e231..373fee14a 100644
--- a/sys-utils/lscpu.c
+++ b/sys-utils/lscpu.c
@@ -21,7 +21,6 @@
#include <ctype.h>
#include <dirent.h>
-#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <getopt.h>
@@ -37,6 +36,7 @@
#include "cpuset.h"
#include "nls.h"
+#include "c.h"
#define CACHE_MAX 100
diff --git a/sys-utils/renice.c b/sys-utils/renice.c
index 6b1a9726b..b4d96e02f 100644
--- a/sys-utils/renice.c
+++ b/sys-utils/renice.c
@@ -44,8 +44,8 @@
#include <stdlib.h>
#include <string.h>
#include <errno.h>
-#include <err.h>
#include "nls.h"
+#include "c.h"
static int donice(int,int,int);
diff --git a/sys-utils/rtcwake.c b/sys-utils/rtcwake.c
index 06f5c3839..da8c085fe 100644
--- a/sys-utils/rtcwake.c
+++ b/sys-utils/rtcwake.c
@@ -28,7 +28,6 @@
#include <unistd.h>
#include <errno.h>
#include <time.h>
-#include <err.h>
#include <sys/ioctl.h>
#include <sys/time.h>
@@ -41,6 +40,7 @@
#include "pathnames.h"
#include "usleep.h"
#include "strutils.h"
+#include "c.h"
/* constants from legacy PC/AT hardware */
#define RTC_PF 0x40
diff --git a/sys-utils/switch_root.c b/sys-utils/switch_root.c
index c43225da2..2dfed71a0 100644
--- a/sys-utils/switch_root.c
+++ b/sys-utils/switch_root.c
@@ -32,7 +32,7 @@
#include <errno.h>
#include <ctype.h>
#include <dirent.h>
-#include <err.h>
+#include "c.h"
#ifndef MS_MOVE
#define MS_MOVE 8192
diff --git a/sys-utils/unshare.c b/sys-utils/unshare.c
index 12a725e3b..343a86ee3 100644
--- a/sys-utils/unshare.c
+++ b/sys-utils/unshare.c
@@ -18,7 +18,6 @@
* 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <err.h>
#include <errno.h>
#include <getopt.h>
#include <sched.h>
@@ -27,6 +26,7 @@
#include <unistd.h>
#include "nls.h"
+#include "c.h"
#ifndef CLONE_NEWSNS
# define CLONE_NEWNS 0x00020000