changeset: 97:2f259700e4f2
tag: tip
user: Connor Lane Smith <cls_AT_lubutu.com>
date: Sat Jun 25 18:49:32 2011 +0100
files: util/apathmax.c
description:
path_max not useful
diff -r 2bc3f0148ec9 -r 2f259700e4f2 util/apathmax.c
--- a/util/apathmax.c Sat Jun 25 17:33:38 2011 +0100
+++ b/util/apathmax.c Sat Jun 25 18:49:32 2011 +0100
@@ -1,6 +1,5 @@
/* See LICENSE file for copyright and license details. */
#include <errno.h>
-#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -9,9 +8,6 @@
void
apathmax(char **p, long *size)
{
-#ifdef PATH_MAX
- *size = PATH_MAX;
-#else
errno = 0;
if((*size = pathconf(".", _PC_PATH_MAX)) == -1) {
if(errno == 0)
@@ -19,7 +15,6 @@
else
eprintf("pathconf:");
}
-#endif
if(!(*p = malloc(*size)))
eprintf("malloc:");
}
Received on Sat Jun 25 2011 - 19:50:09 CEST
This archive was generated by hypermail 2.2.0 : Sat Jun 25 2011 - 20:00:07 CEST