summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-03-26 13:21:22 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-03-26 13:21:22 +0800
commitacc75108f01a8c7f090deb6a61f6923246f9ff02 (patch)
tree8d691fb091d66a972e32a505938dfec1ac3f2d55 /include
parent212bdcdaf3069d8aac268441352eb4dc69f87583 (diff)
downloadpttbbs-acc75108f01a8c7f090deb6a61f6923246f9ff02.tar
pttbbs-acc75108f01a8c7f090deb6a61f6923246f9ff02.tar.gz
pttbbs-acc75108f01a8c7f090deb6a61f6923246f9ff02.tar.bz2
pttbbs-acc75108f01a8c7f090deb6a61f6923246f9ff02.tar.lz
pttbbs-acc75108f01a8c7f090deb6a61f6923246f9ff02.tar.xz
pttbbs-acc75108f01a8c7f090deb6a61f6923246f9ff02.tar.zst
pttbbs-acc75108f01a8c7f090deb6a61f6923246f9ff02.zip
- (internal) drop deprecated old OS support. focus on modern Linux/FreeBSD now.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4020 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'include')
-rw-r--r--include/osdep.h7
-rw-r--r--include/proto.h29
2 files changed, 3 insertions, 33 deletions
diff --git a/include/osdep.h b/include/osdep.h
index 1fc6ebff..3aa93e7b 100644
--- a/include/osdep.h
+++ b/include/osdep.h
@@ -16,11 +16,11 @@
#elif defined(__linux__)
+ #define _GNU_SOURCE /* for strcasestr */
#include <sys/ioctl.h>
#include <sys/file.h> /* for flock() */
#include <strings.h> /* for strcasecmp() */
- #define NEED_STRCASESTR
#define NEED_STRLCPY
#define NEED_STRLCAT
@@ -35,16 +35,11 @@
#define _ISOC99_SOURCE
- #define NEED_FLOCK
- #define NEED_UNSETENV
- #define NEED_SCANDIR
- #define NEED_STRCASESTR
#define NEED_TIMEGM
#if __OS_MAJOR_VERSION__ == 5 && __OS_MINOR_VERSION__ < 8
#define NEED_STRLCPY
#define NEED_STRLCAT
- #define NEED_INET_PTON
#endif
#if __OS_MAJOR_VERSION__ == 5 && __OS_MAJOR_VERSION__ < 6
diff --git a/include/proto.h b/include/proto.h
index dd893cda..a69288f4 100644
--- a/include/proto.h
+++ b/include/proto.h
@@ -47,8 +47,6 @@ void BlogMain(int);
#endif
/* args */
-void initsetproctitle(int argc, char **argv, char **envp);
-void setproctitle(const char* format, ...) GCC_CHECK_FORMAT(1,2);
/* assess */
int inc_goodpost(const char *, int num);
@@ -476,22 +474,8 @@ char *completeutmp_getname(int where);
/* osdep */
int cpuload(char *str);
-double swapused(int *total, int *used);
-
-#ifdef NEED_FLOCK
- #define LOCK_EX 1
- #define LOCK_UN 2
-
- int flock(int, int);
-#endif
-
-#ifdef NEED_UNSETENV
- void unsetenv(char *name);
-#endif
-
-#ifdef NEED_STRCASESTR
- char *strcasestr(const char *big, const char *little);
-#endif
+void initsetproctitle(int argc, char **argv, char **envp);
+void setproctitle(const char* format, ...) GCC_CHECK_FORMAT(1,2);
#ifdef NEED_STRLCPY
size_t strlcpy(char *dst, const char *src, size_t size);
@@ -501,15 +485,6 @@ double swapused(int *total, int *used);
size_t strlcat(char *dst, const char *src, size_t size);
#endif
-#ifdef NEED_SCANDIR
- int scandir(const char *dirname, struct dirent ***namelist, int (*select)(struct dirent *), int (*compar)(const void *, const void *));
- int alphasort(const void *d1, const void *d2);
-#endif
-
-#ifdef NEED_INET_PTON
- int inet_pton(int af, const char *src, void *dst);
-#endif
-
/* othello */
int othello_main(void);