Prefer PATH_MAX to MAXPATHLEN
This commit is contained in:
parent
7a12feb5e9
commit
028bbd0d6f
|
@ -1,5 +1,5 @@
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
/* Copyright (c) 2009 Pierre Pronchery <khorben@defora.org> */
|
/* Copyright (c) 2011 Pierre Pronchery <khorben@defora.org> */
|
||||||
/* This file is part of DeforaOS Unix utils */
|
/* This file is part of DeforaOS Unix utils */
|
||||||
/* This program is free software: you can redistribute it and/or modify
|
/* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -18,6 +18,7 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <limits.h>
|
||||||
|
|
||||||
|
|
||||||
/* types */
|
/* types */
|
||||||
|
@ -34,8 +35,8 @@ static int _pwd_error(char const * message, int ret);
|
||||||
static int _pwd(pwd_flag pf)
|
static int _pwd(pwd_flag pf)
|
||||||
{
|
{
|
||||||
char * pwd;
|
char * pwd;
|
||||||
#ifdef MAXPATHLEN
|
#ifdef PATH_MAX
|
||||||
char buf[MAXPATHLEN];
|
char buf[PATH_MAX];
|
||||||
#else
|
#else
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user