No longer need <limits.h>
This commit is contained in:
parent
4a46807f3f
commit
6e9e8369b5
|
@ -18,7 +18,6 @@
|
|||
|
||||
#include <sys/stat.h>
|
||||
#include <libgen.h>
|
||||
#include <limits.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
@ -36,7 +35,6 @@ Cpp * cpp_new(char const * filename, int filters)
|
|||
{
|
||||
Cpp * cpp;
|
||||
String * p;
|
||||
char buf[PATH_MAX];
|
||||
int r = 0;
|
||||
|
||||
if((cpp = object_new(sizeof(*cpp))) == NULL)
|
||||
|
@ -48,8 +46,11 @@ Cpp * cpp_new(char const * filename, int filters)
|
|||
r |= cpp_path_add(cpp, dirname(p)); /* FIXME inclusion order */
|
||||
string_delete(p);
|
||||
}
|
||||
if(getcwd(buf, sizeof(buf)) != NULL)
|
||||
r |= cpp_path_add(cpp, buf);
|
||||
if((p = getcwd(NULL, 0)) != NULL)
|
||||
{
|
||||
r |= cpp_path_add(cpp, p);
|
||||
free(p);
|
||||
}
|
||||
else
|
||||
error_set("%s%s", "getcwd: ", strerror(errno));
|
||||
if(r != 0 || cpp->parser == NULL || cpp->paths_cnt != 2)
|
||||
|
|
Loading…
Reference in New Issue
Block a user