unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH 01/10] gnu: base: Pass PATH_MAX TO sed and patch.
@ 2015-05-18 22:15 Manolis Ragkousis
  2015-05-19 16:17 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Manolis Ragkousis @ 2015-05-18 22:15 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Guix-devel

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



[-- Attachment #2: 0001-gnu-base-Pass-PATH_MAX-TO-sed-and-patch.patch --]
[-- Type: text/x-patch, Size: 1326 bytes --]

From 4eb7220772b5ddb916debb5577ebc8febbba55b4 Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@gmail.com>
Date: Sun, 3 May 2015 22:02:12 +0300
Subject: [PATCH 01/10] gnu: base: Pass PATH_MAX TO sed and patch.

* gnu/packages/base.scm (sed): Pass PATH_MAX to configure.
* gnu/packages/base.scm (patch): Same.
---
 gnu/packages/base.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 6f46119..f2e7fb5 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -110,7 +110,7 @@ including, for example, recursive directory searching.")
    (synopsis "Stream editor")
    (arguments
     (if (%current-target-system)
-        '()
+        '(#:configure-flags '("CPPFLAGS=-DPATH_MAX=4096"))
         `(#:phases (alist-cons-before
                     'patch-source-shebangs 'patch-test-suite
                     (lambda* (#:key inputs #:allow-other-keys)
@@ -165,6 +165,8 @@ standard utility.")
                (base32
                 "16d2r9kpivaak948mxzc0bai45mqfw73m113wrkmbffnalv1b5gx"))))
    (build-system gnu-build-system)
+   (arguments
+    `(#:configure-flags '("CPPFLAGS=-DPATH_MAX=4096")))
    (native-inputs `(("ed", ed)))
    (synopsis "Apply differences to originals, with optional backups")
    (description
-- 
2.4.1


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

* Re: [PATCH 01/10] gnu: base: Pass PATH_MAX TO sed and patch.
  2015-05-18 22:15 [PATCH 01/10] gnu: base: Pass PATH_MAX TO sed and patch Manolis Ragkousis
@ 2015-05-19 16:17 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2015-05-19 16:17 UTC (permalink / raw)
  To: Manolis Ragkousis; +Cc: Guix-devel

Manolis Ragkousis <manolis837@gmail.com> skribis:

> From 4eb7220772b5ddb916debb5577ebc8febbba55b4 Mon Sep 17 00:00:00 2001
> From: Manolis Ragkousis <manolis837@gmail.com>
> Date: Sun, 3 May 2015 22:02:12 +0300
> Subject: [PATCH 01/10] gnu: base: Pass PATH_MAX TO sed and patch.
>
> * gnu/packages/base.scm (sed): Pass PATH_MAX to configure.
> * gnu/packages/base.scm (patch): Same.

[...]

> +        '(#:configure-flags '("CPPFLAGS=-DPATH_MAX=4096"))
>          `(#:phases (alist-cons-before
>                      'patch-source-shebangs 'patch-test-suite
>                      (lambda* (#:key inputs #:allow-other-keys)
> @@ -165,6 +165,8 @@ standard utility.")
>                 (base32
>                  "16d2r9kpivaak948mxzc0bai45mqfw73m113wrkmbffnalv1b5gx"))))
>     (build-system gnu-build-system)
> +   (arguments
> +    `(#:configure-flags '("CPPFLAGS=-DPATH_MAX=4096")))

Could you make sure ‘PATH_MAX’ is only defined on GNU/Hurd?

It might be best to just come up with a patch to the source.  For Guix,
an acceptable patch is just:

  #ifndef PATH_MAX
  # define PATH_MAX 4096
  #endif

added in the right place.

The ideal patch for upstream is something that uses malloc and similar
instead of fixed-length arrays.

Thanks,
Ludo’.

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

end of thread, other threads:[~2015-05-19 16:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-18 22:15 [PATCH 01/10] gnu: base: Pass PATH_MAX TO sed and patch Manolis Ragkousis
2015-05-19 16:17 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).