summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2014-09-03 02:34:35 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2014-09-03 02:34:35 +0000
commitc965dae0a6b178e8949989e3b284df9324b3f174 (patch)
treef31f8421cc4f344d860284eba9ce5ac8ae0fed5d
parent40a00b27bf61af5bc58e4f5d15cdb0f26f90ad9a (diff)
Kill off compat for systems that don't define NAME_MAX or that lack stuff
like, oh, strchr() and prototypes for read() and write(). Mark quit() as both __dead and printf-like, and dumpabort() as __dead. ok krw@
-rw-r--r--sbin/dump/dump.h33
1 files changed, 6 insertions, 27 deletions
diff --git a/sbin/dump/dump.h b/sbin/dump/dump.h
index 59ad7c0ea86..83663dacfec 100644
--- a/sbin/dump/dump.h
+++ b/sbin/dump/dump.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dump.h,v 1.21 2014/07/11 16:01:41 halex Exp $ */
+/* $OpenBSD: dump.h,v 1.22 2014/09/03 02:34:34 guenther Exp $ */
/* $NetBSD: dump.h,v 1.11 1997/06/05 11:13:20 lukem Exp $ */
/*-
@@ -88,11 +88,12 @@ void broadcast(char *message);
time_t do_stats(void);
void lastdump(int arg); /* int should be char */
void msg(const char *fmt, ...)
- __attribute__((__format__ (printf, 1, 2)));
+ __attribute__((__format__ (printf, 1, 2)));
void msgtail(const char *fmt, ...)
- __attribute__((__format__ (printf, 1, 2)));
+ __attribute__((__format__ (printf, 1, 2)));
int query(char *question);
-void quit(const char *fmt, ...);
+__dead void quit(const char *fmt, ...)
+ __attribute__((__format__ (printf, 1, 2)));
void statussig(int);
void timeest(void);
@@ -121,7 +122,7 @@ void trewind(void);
void writerec(char *dp, int isspcl);
__dead void Exit(int status);
-void dumpabort(int signo);
+__dead void dumpabort(int signo);
void getfstab(void);
char *rawname(char *cp);
@@ -149,10 +150,6 @@ void interrupt(int signo); /* in case operator bangs on console */
struct fstab *fstabsearch(char *key); /* search fs_file and fs_spec */
-#ifndef NAME_MAX
-#define NAME_MAX 255
-#endif
-
/*
* The contents of the file _PATH_DUMPDATES is maintained both on
* a linked list, and then (eventually) arrayified.
@@ -178,21 +175,3 @@ void putdumptime(void);
void sig(int signo);
-/*
- * Compatibility with old systems.
- */
-#ifdef COMPAT
-#include <sys/file.h>
-#define strchr(a,b) index(a,b)
-#define strrchr(a,b) rindex(a,b)
-extern char *strdup(), *ctime();
-extern int read(), write();
-extern int errno;
-#endif
-
-#ifndef _PATH_UTMP
-#define _PATH_UTMP "/etc/utmp"
-#endif
-#ifndef _PATH_FSTAB
-#define _PATH_FSTAB "/etc/fstab"
-#endif