all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: sed: Set PATH_MAX for HURD systems.
@ 2015-06-08 13:14 Manolis Ragkousis
  2015-06-08 14:14 ` Ludovic Courtès
  2015-06-08 14:15 ` Ludovic Courtès
  0 siblings, 2 replies; 3+ messages in thread
From: Manolis Ragkousis @ 2015-06-08 13:14 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Guix-devel

[-- Attachment #1: Type: text/plain, Size: 50 bytes --]

I think this one should go to core-updates. WDYT?

[-- Attachment #2: 0001-gnu-sed-Set-PATH_MAX-for-HURD-systems.patch --]
[-- Type: text/x-patch, Size: 2354 bytes --]

From 827ad2cf704aa0123b509f7f01da8d4413d97113 Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@gmail.com>
Date: Mon, 8 Jun 2015 16:04:07 +0300
Subject: [PATCH] gnu: sed: Set PATH_MAX for HURD systems.

* gnu/packages/patches/sed-hurd-path-max.patch: New file.
* gnu-system.am (dist_patch_DATA): Add it.
---
 gnu-system.am                                |  1 +
 gnu/packages/base.scm                        |  3 ++-
 gnu/packages/patches/sed-hurd-path-max.patch | 19 +++++++++++++++++++
 3 files changed, 22 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/sed-hurd-path-max.patch

diff --git a/gnu-system.am b/gnu-system.am
index 6a82170..8b4f703 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -538,6 +538,7 @@ dist_patch_DATA =						\
   gnu/packages/patches/ratpoison-shell.patch			\
   gnu/packages/patches/readline-link-ncurses.patch		\
   gnu/packages/patches/ripperx-libm.patch			\
+  gnu/packages/patches/sed-hurd-path-max.patch			\
   gnu/packages/patches/scheme48-tests.patch			\
   gnu/packages/patches/scotch-test-threading.patch		\
   gnu/packages/patches/sdl-libx11-1.6.patch			\
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index db50652..67bdab4 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -105,7 +105,8 @@ including, for example, recursive directory searching.")
                                 ".tar.bz2"))
             (sha256
              (base32
-              "1myvrmh99jsvk7v3d7crm0gcrq51hmmm1r2kjyyci152in1x2j7h"))))
+              "1myvrmh99jsvk7v3d7crm0gcrq51hmmm1r2kjyyci152in1x2j7h"))
+            (patches (list (search-patch "sed-hurd-path-max.patch")))))
    (build-system gnu-build-system)
    (synopsis "Stream editor")
    (arguments
diff --git a/gnu/packages/patches/sed-hurd-path-max.patch b/gnu/packages/patches/sed-hurd-path-max.patch
new file mode 100644
index 0000000..b77e19d
--- /dev/null
+++ b/gnu/packages/patches/sed-hurd-path-max.patch
@@ -0,0 +1,19 @@
+Define PATH_MAX for HURD systems.
+
+diff --git a/lib/pathmax.h b/lib/pathmax.h
+index bd0bc00..8835c98 100644
+--- a/lib/pathmax.h
++++ b/lib/pathmax.h
+@@ -45,6 +45,10 @@
+ 
+ # include <limits.h>
+ 
++# ifndef PATH_MAX
++#  define PATH_MAX 8192
++# endif
++
+ # ifndef _POSIX_PATH_MAX
+ #  define _POSIX_PATH_MAX 256
+ # endif
+-- 
+2.4.2
\ No newline at end of file
-- 
2.4.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] gnu: sed: Set PATH_MAX for HURD systems.
  2015-06-08 13:14 [PATCH] gnu: sed: Set PATH_MAX for HURD systems Manolis Ragkousis
@ 2015-06-08 14:14 ` Ludovic Courtès
  2015-06-08 14:15 ` Ludovic Courtès
  1 sibling, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2015-06-08 14:14 UTC (permalink / raw)
  To: Manolis Ragkousis; +Cc: Guix-devel

[-- Attachment #1: Type: text/plain, Size: 713 bytes --]

Manolis Ragkousis <manolis837@gmail.com> skribis:

> I think this one should go to core-updates. WDYT?
>
> From 827ad2cf704aa0123b509f7f01da8d4413d97113 Mon Sep 17 00:00:00 2001
> From: Manolis Ragkousis <manolis837@gmail.com>
> Date: Mon, 8 Jun 2015 16:04:07 +0300
> Subject: [PATCH] gnu: sed: Set PATH_MAX for HURD systems.
>
> * gnu/packages/patches/sed-hurd-path-max.patch: New file.
> * gnu-system.am (dist_patch_DATA): Add it.

Please use the patch below instead as ‘sed-hurd-path-max.patch’: It’s
the one from upstream (slightly edited for compactness), and we’ll
directly see that it’s from upstream.

OK to push to ‘core-updates’ with this change.

Thanks!

Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 976 bytes --]

7bb8d35d0330161a5af5341471d0c183a067e8c2
Author: Jose E. Marchesi <jemarch@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  <jemarch@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.

--- a/basicdefs.h
+++ b/basicdefs.h
@@ -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
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gnu: sed: Set PATH_MAX for HURD systems.
  2015-06-08 13:14 [PATCH] gnu: sed: Set PATH_MAX for HURD systems Manolis Ragkousis
  2015-06-08 14:14 ` Ludovic Courtès
@ 2015-06-08 14:15 ` Ludovic Courtès
  1 sibling, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2015-06-08 14:15 UTC (permalink / raw)
  To: Manolis Ragkousis; +Cc: Guix-devel

Also, nitpicking: The proper spelling is “Hurd”, not “HURD”.

Ludo’.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-06-08 14:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-08 13:14 [PATCH] gnu: sed: Set PATH_MAX for HURD systems Manolis Ragkousis
2015-06-08 14:14 ` Ludovic Courtès
2015-06-08 14:15 ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.