Hello,

I have NMU-ed to DELAYED/7 with the attached patch, which is already in
git.

Samuel
commit 7bb8d35d0330161a5af5341471d0c183a067e8c2
Author: Jose E. Marchesi <jema...@gnu.org>
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  <jema...@gnu.org>
    
        * 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/ChangeLog b/ChangeLog
index 6196133..4e1a0c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-10-06  Jose E. Marchesi  <jema...@gnu.org>
+
+       * 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.
+
 2013-09-30  Jose E. Marchesi  <jema...@gnu.org>
 
        * doc/sed.texi (Regular Expressions): Typo: implicity numbered ->
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 <ctype.h> 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
@@ -1,6 +1,6 @@
 # Bootstrap configuration.
 
-# Copyright (C) 2006-2008 Free Software Foundation, Inc.
+# Copyright (C) 2006-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
@@ -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 threadlib
     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 <limits.h>
 
 #include "utils.h"
-#include "pathmax.h"
 #include "fwriting.h"
 
 const char *myname;

Reply via email to