unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: guile-static: Use Linux syscalls only on Linux systems.
@ 2015-05-23 19:13 Manolis Ragkousis
  2015-05-23 22:37 ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Manolis Ragkousis @ 2015-05-23 19:13 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Guix-devel

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

Because of "guile-linux-syscalls.patch" current form, I end up getting
no <sys/mount.h> found when Hurd it targeted.
I added #ifdef __LINUX__ so the patch will be used only on Linux systems.

[-- Attachment #2: 0001-gnu-guile-static-Use-Linux-syscalls-only-on-Linux-sy.patch --]
[-- Type: text/x-patch, Size: 1229 bytes --]

From ac6bab86b2ae5509e29aea15125f31ea18c0015f Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@gmail.com>
Date: Sat, 23 May 2015 22:10:34 +0300
Subject: [PATCH] gnu: guile-static: Use Linux syscalls only on Linux systems.

* gnu/packages/patches/guile-linux-syscalls.patch: Use Linux
  syscalls only on Linux systems.
---
 gnu/packages/patches/guile-linux-syscalls.patch | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/patches/guile-linux-syscalls.patch b/gnu/packages/patches/guile-linux-syscalls.patch
index 57c7f25..4a3fe5b 100644
--- a/gnu/packages/patches/guile-linux-syscalls.patch
+++ b/gnu/packages/patches/guile-linux-syscalls.patch
@@ -7,12 +7,13 @@ diff --git a/libguile/posix.c b/libguile/posix.c
 index 324f21b..cbee94d 100644
 --- a/libguile/posix.c
 +++ b/libguile/posix.c
-@@ -2286,6 +2286,261 @@ scm_init_popen (void)
+@@ -2245,6 +2245,263 @@ scm_init_popen (void)
  }
  #endif
  
 +\f
 +/* Linux! */
++#ifdef __LINUX__
 +
 +#include <sys/mount.h>
 +#include "libguile/foreign.h"
@@ -265,7 +266,10 @@ index 324f21b..cbee94d 100644
 +  return scm_from_short (ifr.ifr_flags);
 +}
 +#undef FUNC_NAME
++#endif
 +
  void
  scm_init_posix ()
  {
+-- 
+2.4.1
-- 
2.4.1


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

* Re: [PATCH] gnu: guile-static: Use Linux syscalls only on Linux systems.
  2015-05-23 19:13 [PATCH] gnu: guile-static: Use Linux syscalls only on Linux systems Manolis Ragkousis
@ 2015-05-23 22:37 ` Ludovic Courtès
  2015-06-09 19:23   ` Manolis Ragkousis
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2015-05-23 22:37 UTC (permalink / raw)
  To: Manolis Ragkousis; +Cc: Guix-devel

Manolis Ragkousis <manolis837@gmail.com> skribis:

> Because of "guile-linux-syscalls.patch" current form, I end up getting
> no <sys/mount.h> found when Hurd it targeted.
> I added #ifdef __LINUX__ so the patch will be used only on Linux systems.
>
> From ac6bab86b2ae5509e29aea15125f31ea18c0015f Mon Sep 17 00:00:00 2001
> From: Manolis Ragkousis <manolis837@gmail.com>
> Date: Sat, 23 May 2015 22:10:34 +0300
> Subject: [PATCH] gnu: guile-static: Use Linux syscalls only on Linux systems.
>
> * gnu/packages/patches/guile-linux-syscalls.patch: Use Linux
>   syscalls only on Linux systems.

This must be:

  #ifdef __linux__

Lower-case.  I don’t think __LINUX__ is ever defined.  (See the output
of “cpp -dM /dev/null|grep -i linux”.)

Also, s/Linux systems/Linux-based systems/

OK with these changes.

(This change is acceptable because so far this patch is used only for
the initrd Guile, and there’s no initrd on GNU/Hurd.

Note that eventually, when you start porting GuixSD to GNU/Hurd, you’ll
notice that we rely on libc’s ‘mount’ and ‘umount’ functions.  These are
currently not implemented on GNU/Hurd, but it’s “just a matter” of
implementing them in terms of ‘file_set_translator’ & co., which is
mostly done in the Hurd’s utils/{,u}mount.c.)

Thanks!

Ludo’.

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

* Re: [PATCH] gnu: guile-static: Use Linux syscalls only on Linux systems.
  2015-05-23 22:37 ` Ludovic Courtès
@ 2015-06-09 19:23   ` Manolis Ragkousis
  2015-06-09 20:01     ` Manolis Ragkousis
  2015-06-09 20:06     ` Ludovic Courtès
  0 siblings, 2 replies; 5+ messages in thread
From: Manolis Ragkousis @ 2015-06-09 19:23 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Guix-devel

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

I forgot this patch. Updated patch.

[-- Attachment #2: 0001-gnu-guile-static-Use-Linux-syscalls-only-on-Linux-ba.patch --]
[-- Type: text/x-patch, Size: 1242 bytes --]

From 84ef1393099fe0245f22402387d9ae578a91e9e8 Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@gmail.com>
Date: Sat, 23 May 2015 22:10:34 +0300
Subject: [PATCH] gnu: guile-static: Use Linux syscalls only on Linux-based
 systems.

* gnu/packages/patches/guile-linux-syscalls.patch: Use Linux
  syscalls only on Linux-based systems.
---
 gnu/packages/patches/guile-linux-syscalls.patch | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/patches/guile-linux-syscalls.patch b/gnu/packages/patches/guile-linux-syscalls.patch
index 57c7f25..25a5e90 100644
--- a/gnu/packages/patches/guile-linux-syscalls.patch
+++ b/gnu/packages/patches/guile-linux-syscalls.patch
@@ -7,12 +7,13 @@ diff --git a/libguile/posix.c b/libguile/posix.c
 index 324f21b..cbee94d 100644
 --- a/libguile/posix.c
 +++ b/libguile/posix.c
-@@ -2286,6 +2286,261 @@ scm_init_popen (void)
+@@ -2245,6 +2245,263 @@ scm_init_popen (void)
  }
  #endif
  
 +\f
 +/* Linux! */
++#ifdef __linux__
 +
 +#include <sys/mount.h>
 +#include "libguile/foreign.h"
@@ -265,7 +266,10 @@ index 324f21b..cbee94d 100644
 +  return scm_from_short (ifr.ifr_flags);
 +}
 +#undef FUNC_NAME
++#endif
 +
  void
  scm_init_posix ()
  {
+-- 
+2.4.1
-- 
2.4.2


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

* Re: [PATCH] gnu: guile-static: Use Linux syscalls only on Linux systems.
  2015-06-09 19:23   ` Manolis Ragkousis
@ 2015-06-09 20:01     ` Manolis Ragkousis
  2015-06-09 20:06     ` Ludovic Courtès
  1 sibling, 0 replies; 5+ messages in thread
From: Manolis Ragkousis @ 2015-06-09 20:01 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Guix-devel

I took the liberty and pushed it because it had the changes you suggested.

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

* Re: [PATCH] gnu: guile-static: Use Linux syscalls only on Linux systems.
  2015-06-09 19:23   ` Manolis Ragkousis
  2015-06-09 20:01     ` Manolis Ragkousis
@ 2015-06-09 20:06     ` Ludovic Courtès
  1 sibling, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2015-06-09 20:06 UTC (permalink / raw)
  To: Manolis Ragkousis; +Cc: Guix-devel

Manolis Ragkousis <manolis837@gmail.com> skribis:

> From 84ef1393099fe0245f22402387d9ae578a91e9e8 Mon Sep 17 00:00:00 2001
> From: Manolis Ragkousis <manolis837@gmail.com>
> Date: Sat, 23 May 2015 22:10:34 +0300
> Subject: [PATCH] gnu: guile-static: Use Linux syscalls only on Linux-based
>  systems.
>
> * gnu/packages/patches/guile-linux-syscalls.patch: Use Linux
>   syscalls only on Linux-based systems.

Rather: “Wrap new subrs in #ifdef __linux__.”

OK for master or core-updates, whichever is more convenient for you (the
latter, I guess.)

Ludo’.

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

end of thread, other threads:[~2015-06-09 20:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-23 19:13 [PATCH] gnu: guile-static: Use Linux syscalls only on Linux systems Manolis Ragkousis
2015-05-23 22:37 ` Ludovic Courtès
2015-06-09 19:23   ` Manolis Ragkousis
2015-06-09 20:01     ` Manolis Ragkousis
2015-06-09 20:06     ` 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).