diff options
author | TAW Dev <tawdev@taw> | 2009-07-06 11:49:58 -0400 |
---|---|---|
committer | TAW Dev <tawdev@taw> | 2009-07-06 11:49:58 -0400 |
commit | e9c1a79b6306783d63655eca5ddbcca0b6d825d0 (patch) | |
tree | 69116c5512190eba57b2ed2daa52f15e469ed36c /eathena-monitor.c | |
parent | d23c620a88ac71c68af195f5fe82b09ee171187f (diff) | |
parent | ad8f53edc80811b933c9e2e0f469ef6e6a25972d (diff) | |
download | tmwa-e9c1a79b6306783d63655eca5ddbcca0b6d825d0.tar.gz tmwa-e9c1a79b6306783d63655eca5ddbcca0b6d825d0.tar.bz2 tmwa-e9c1a79b6306783d63655eca5ddbcca0b6d825d0.tar.xz tmwa-e9c1a79b6306783d63655eca5ddbcca0b6d825d0.zip |
Merge branch 'master' of git://gitorious.org/tmw-eathena/mainline
Diffstat (limited to 'eathena-monitor.c')
-rw-r--r-- | eathena-monitor.c | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/eathena-monitor.c b/eathena-monitor.c index 13048d4..d0b3995 100644 --- a/eathena-monitor.c +++ b/eathena-monitor.c @@ -1,9 +1,9 @@ -/* -Name: eAthena processes monitor -Author: Bartosz Waszak <waszi@evil.org.pl> -License: GPL -Compilation: -gcc -o eathena-monitor eathena-monitor.c +/** + * Name: eAthena processes monitor + * Author: Bartosz Waszak <waszi@evil.org.pl> + * License: GPL + * Compilation: + * gcc -o eathena-monitor eathena-monitor.c */ #include <unistd.h> @@ -11,7 +11,21 @@ gcc -o eathena-monitor eathena-monitor.c #include <string.h> #include <stdlib.h> #include <sys/types.h> +#include <sys/stat.h> + +#if !defined(linux) && (defined(__sgi) || defined(__sun__) || defined(__sun) || defined(__sparc) || defined(__sparc__)) +#include <sys/statfs.h> +#endif + +#if defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__) +#include <sys/param.h> +#include <sys/mount.h> +#endif + +#if defined(linux) || defined(__CYGWIN32__) || defined(__hpux) #include <sys/vfs.h> +#endif + #include <dirent.h> #include <errno.h> #include <time.h> @@ -25,7 +39,9 @@ gcc -o eathena-monitor eathena-monitor.c #define CHAR_SERVER "char-server" #define CONFIG "conf/eathena-monitor.conf" #define LOGFILE "log/eathena-monitor.log" +#ifndef PATH_MAX #define PATH_MAX 4096 +#endif #define IS_BLANK(ptr) \ (((*(ptr)) == ' ') || ((*(ptr)) == '\b') || \ |