commit 7bb8d35d0330161a5af5341471d0c183a067e8c2 Author: Jose E. Marchesi Date: Sun Oct 6 14:43:38 2013 +0200 Set PATH_MAX to some constant in case it is not defined in system headers. 2013-10-06 Jose E. Marchesi * basicdefs.h (PATH_MAX): Defined to some constant in case it is not defined by system headers. * sed/utils.c: Do not include pathmax.h anymore. * bootstrap.conf (gnulib_modules): Do not use the gnulib module pathmax. diff --git a/basicdefs.h b/basicdefs.h index 0d28a97..09f5beb 100644 --- a/basicdefs.h +++ b/basicdefs.h @@ -1,5 +1,6 @@ /* GNU SED, a batch stream editor. - Copyright (C) 1998, 1999, 2002, 2003, 2010 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2002, 2003, 2010, 2013 + Free Software Foundation, Inc. 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 @@ -40,6 +41,13 @@ typedef unsigned long countT; #define obstack_chunk_alloc ck_malloc #define obstack_chunk_free free +/* MAX_PATH is not defined in some platforms, most notably GNU/Hurd. + In that case we define it here to some constant. Note however that + this relies in the fact that sed does reallocation if a buffer + needs to be larger than PATH_MAX. */ +#ifndef PATH_MAX +# define PATH_MAX 200 +#endif /* handle misdesigned macros (snarfed from lib/regex.c) */ /* Jim Meyering writes: diff --git a/bootstrap.conf b/bootstrap.conf index 48ab2aa..dc64da9 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -19,7 +19,7 @@ # gnulib modules used by this package. gnulib_modules=" acl alloca btowc c-ctype extensions fwriting getdelim getopt gettext-h - localcharset mbrlen mbrtowc mbsinit memchr mkostemp obstack pathmax regex + localcharset mbrlen mbrtowc mbsinit memchr mkostemp obstack regex rename selinux-h stdbool stat-macros ssize_t strerror strverscmp unlocked-io verify version-etc-fsf wcrtomb wctob" diff --git a/sed/utils.c b/sed/utils.c index aa674fd..0a53511 100644 --- a/sed/utils.c +++ b/sed/utils.c @@ -1,5 +1,5 @@ /* Functions from hack's utils library. - Copyright (C) 1989, 1990, 1991, 1998, 1999, 2003, 2008, 2009, 2011 + Copyright (C) 1989, 1990, 1991, 1998, 1999, 2003, 2008, 2009, 2011, 2013 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -29,7 +29,6 @@ #include #include "utils.h" -#include "pathmax.h" #include "fwriting.h" const char *myname;