aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-05-27 02:57:09 +0000
committerMike Frysinger <vapier@gentoo.org>2005-05-27 02:57:09 +0000
commit87f34823710458a6d83b317c5b370b11274af998 (patch)
tree954ee36d25d4418ade34d1a8397a999762c6ac1a /pspax.c
parenttouchup output (diff)
downloadpax-utils-87f34823710458a6d83b317c5b370b11274af998.tar.gz
pax-utils-87f34823710458a6d83b317c5b370b11274af998.tar.bz2
pax-utils-87f34823710458a6d83b317c5b370b11274af998.zip
use _POSIX_PATH_MAX instead of PATH_MAX for FreeBSD
Diffstat (limited to 'pspax.c')
-rw-r--r--pspax.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/pspax.c b/pspax.c
index 0a0acf6..d202b63 100644
--- a/pspax.c
+++ b/pspax.c
@@ -41,7 +41,7 @@
#define PROC_DIR "/proc"
-static const char *rcsid = "$Id: pspax.c,v 1.15 2005/05/27 02:13:23 solar Exp $";
+static const char *rcsid = "$Id: pspax.c,v 1.16 2005/05/27 02:57:09 vapier Exp $";
#define argv0 "pspax"
@@ -55,7 +55,7 @@ static char show_banner = 1;
static char *get_proc_name(pid_t pid)
{
FILE *fp;
- static char str[PATH_MAX];
+ static char str[_POSIX_PATH_MAX];
memset(&str, 0, sizeof(str));
snprintf(str, sizeof(str), PROC_DIR "/%u/stat", pid);
@@ -74,7 +74,7 @@ static char *get_proc_name(pid_t pid)
}
int get_proc_maps(pid_t pid) {
- static char str[PATH_MAX];
+ static char str[_POSIX_PATH_MAX];
FILE *fp;
snprintf(str, sizeof(str), PROC_DIR "/%u/maps", pid);
@@ -113,7 +113,7 @@ static struct passwd *get_proc_uid(pid_t pid)
{
struct stat st;
struct passwd *pwd;
- static char str[PATH_MAX];
+ static char str[_POSIX_PATH_MAX];
snprintf(str, sizeof(str), PROC_DIR "/%u/stat", pid);
@@ -135,7 +135,7 @@ static char *get_proc_status(pid_t pid, char *name)
{
FILE *fp;
size_t len;
- static char str[PATH_MAX];
+ static char str[_POSIX_PATH_MAX];
snprintf(str, sizeof(str), PROC_DIR "/%u/status", pid);
if ((fp = fopen(str, "r")) == NULL)