aboutsummaryrefslogtreecommitdiffstats
path: root/compat.h
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2022-03-09 21:10:26 -0500
committerBrian Cully <bjc@kublai.com>2022-03-09 21:37:48 -0500
commit720864f2a76d4ee3ed75cb99298b8e94c01f1b29 (patch)
tree7a163efe3d699725a9e9dd2c17aebaa6a6feadc7 /compat.h
downloadticra-main.tar.gz
ticra-main.zip
Here’s some old code of mine for a backup system from c. 2000.HEADmain
I used to really hate AMANDA.
Diffstat (limited to 'compat.h')
-rw-r--r--compat.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/compat.h b/compat.h
new file mode 100644
index 0000000..6bfc524
--- /dev/null
+++ b/compat.h
@@ -0,0 +1,37 @@
+/* $Id: compat.h,v 1.2 2000/02/22 22:50:33 shmit Exp $ */
+
+#ifndef COMPAT_H
+# define COMPAT_H
+
+#include <sys/types.h>
+
+#ifdef __NetBSD__
+#define sockopt_t int
+#endif
+
+#ifdef __FreeBSD__
+#define NEED_LIBUTIL
+#define sockopt_t int
+#endif
+
+#ifdef __svr4__
+#define NEED_STRINGS
+#define NEED_SETPROCTITLE
+#define NEED_SNPRINTF
+#define sockopt_t int
+#endif
+
+#ifdef __linux__
+#define NEED_SETPROCTITLE
+#define sockopt_t char
+#endif
+
+#ifdef NEED_SETPROCTITLE
+void setproctitle(const char *fmt, ...);
+#endif
+
+#ifdef NEED_SNPRINTF
+int snprintf(char *str, size_t size, const char *fmt, ...);
+#endif
+
+#endif