[Chicken-hackers] [PATCH] Include reverse-list-string in srfi-13's import library

2014-08-04 Thread Evan Hanson
This procedure is provided by library.scm, but also needs to be exported
by the primitive srfi-13 library so that it's accessible when a module
imports srfi-13 but not chicken.

Fixes #1101.
---
 srfi-13.import.scm |1 +
 1 file changed, 1 insertion(+)

diff --git a/srfi-13.import.scm b/srfi-13.import.scm
index c14bf0e..1dde448 100644
--- a/srfi-13.import.scm
+++ b/srfi-13.import.scm
@@ -29,6 +29,7 @@
  '(check-substring-spec
kmp-step
make-kmp-restart-vector
+   reverse-list-string
string-list
string-any
string-append/shared
-- 
1.7.10.4


___
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers


[Chicken-hackers] [PATCH 1/2] Set HAVE_POSIX_POLL for Android

2014-08-04 Thread Moritz Heidkamp
Hi everyone,

the attached patch enables poll(2) for the Android platform. I verified
via strace on an Android device that poll(2) is actually used after the
patch. A preliminary NEWS entry is included but needs to be updated once
we have a CVE number for this issue.

Moritz
-- 
bevuta IT GmbH - professionelle IT-Lösungen
Marktstraße 10 | http://www.bevuta.com/ | HRB 62476 AG Köln
50968 Köln | Tel.: +49 221 282678-0 | Geschäftsführer: Pablo Beyen

From c902019d70e4389c447f39152e71e1ddfd58395b Mon Sep 17 00:00:00 2001
From: Moritz Heidkamp moritz.heidk...@bevuta.com
Date: Mon, 4 Aug 2014 15:19:48 +0200
Subject: [PATCH 1/2] Set HAVE_POSIX_POLL for Android

---
 Makefile.android | 1 +
 NEWS | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/Makefile.android b/Makefile.android
index 819587f..ac72ee8 100644
--- a/Makefile.android
+++ b/Makefile.android
@@ -69,6 +69,7 @@ chicken-config.h: chicken-defaults.h
 	echo #define HAVE_LONG_LONG 1 $@
 	echo #define HAVE_MEMMOVE 1 $@
 	echo #define HAVE_MEMORY_H 1 $@
+	echo #define HAVE_POSIX_POLL 1 $@
 	echo #define HAVE_SIGACTION 1 $@
 	echo #define HAVE_SIGSETJMP 1 $@
 	echo #define HAVE_STDINT_H 1 $@
diff --git a/NEWS b/NEWS
index 20ece38..b854f8d 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
 4.9.1
 
+- Security fixes
+  - Use POSIX poll() on Android (CVE pending).
+
 - Core libraries
   - alist-ref from unit data-structures now gives an error when passed
 a non-list, for consistency with assv/assq/assoc.
-- 
1.9.4

___
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers


Re: [Chicken-hackers] [PATCH 1/2] Set HAVE_POSIX_POLL for Android

2014-08-04 Thread Moritz Heidkamp
Moritz Heidkamp moritz.heidk...@bevuta.com writes:
 the attached patch enables poll(2) for the Android platform.

Forgot to mention that I think this should probably go into stability.

Moritz

___
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers


[Chicken-hackers] [PATCH 2/2] Invert poll(2) flag default

2014-08-04 Thread Moritz Heidkamp
The attached patch is a follow-up to my previous patch (the one which
enables poll(2) on Android). It inverts the HAVE_POSIX_POLL flag to
HAVE_NO_POSIX_POLL which only needs to be set when poll(2) is *not*
available rather than the other way around. The purpose is to make the
safe choice the default. 

Since this is merely intended to make future changes less likely to
accidentally disable poll(2) it doesn't need to be included in the
stability branch.

I've tested the patch on Linux x86_64 only. Even though it's a rather
trivial patch it would probably be good to also test this on at least
one of the Windows platforms just in case. Any takers?

Thanks to Florian Zumbiehl for the idea for this patch.

Moritz
-- 
bevuta IT GmbH - professionelle IT-Lösungen
Marktstraße 10 | http://www.bevuta.com/ | HRB 62476 AG Köln
50968 Köln | Tel.: +49 221 282678-0 | Geschäftsführer: Pablo Beyen

From 05a5743437e255ca3402b8a56ec69c1d6b2b8f90 Mon Sep 17 00:00:00 2001
From: Moritz Heidkamp moritz.heidk...@bevuta.com
Date: Mon, 4 Aug 2014 15:23:13 +0200
Subject: [PATCH 2/2] Invert poll(2) flag default

To be on the safe side we now assume that poll(2) is available by
default and define the HAVE_NO_POSIX_POLL flag in case it isn't
available on a platform.
---
 Makefile.aix   | 1 -
 Makefile.android   | 1 -
 Makefile.bsd   | 1 -
 Makefile.cross-linux-mingw | 1 +
 Makefile.cygwin| 1 -
 Makefile.haiku | 1 -
 Makefile.hurd  | 1 -
 Makefile.ios   | 1 -
 Makefile.linux | 1 -
 Makefile.macosx| 1 -
 Makefile.mingw | 1 +
 Makefile.mingw-msys| 1 +
 Makefile.solaris   | 1 -
 runtime.c  | 4 ++--
 scheduler.scm  | 2 +-
 15 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/Makefile.aix b/Makefile.aix
index 68b33b7..72e9715 100644
--- a/Makefile.aix
+++ b/Makefile.aix
@@ -74,7 +74,6 @@ chicken-config.h: chicken-defaults.h
 	echo #define HAVE_LONG_LONG 1 $@
 	echo #define HAVE_MEMMOVE 1 $@
 	echo #define HAVE_MEMORY_H 1 $@
-	echo #define HAVE_POSIX_POLL 1 $@
 	echo #define HAVE_SIGACTION 1 $@
 	echo #define HAVE_SIGSETJMP 1 $@
 	echo #define HAVE_STDINT_H 1 $@
diff --git a/Makefile.android b/Makefile.android
index ac72ee8..819587f 100644
--- a/Makefile.android
+++ b/Makefile.android
@@ -69,7 +69,6 @@ chicken-config.h: chicken-defaults.h
 	echo #define HAVE_LONG_LONG 1 $@
 	echo #define HAVE_MEMMOVE 1 $@
 	echo #define HAVE_MEMORY_H 1 $@
-	echo #define HAVE_POSIX_POLL 1 $@
 	echo #define HAVE_SIGACTION 1 $@
 	echo #define HAVE_SIGSETJMP 1 $@
 	echo #define HAVE_STDINT_H 1 $@
diff --git a/Makefile.bsd b/Makefile.bsd
index af28814..c69ea35 100644
--- a/Makefile.bsd
+++ b/Makefile.bsd
@@ -72,7 +72,6 @@ chicken-config.h: chicken-defaults.h
 	echo #define HAVE_LONG_LONG 1 $@
 	echo #define HAVE_MEMMOVE 1 $@
 	echo #define HAVE_MEMORY_H 1 $@
-	echo #define HAVE_POSIX_POLL 1 $@
 	echo #define HAVE_SIGACTION 1 $@
 	echo #define HAVE_SIGSETJMP 1 $@
 	echo #define HAVE_SIGPROCMASK 1 $@
diff --git a/Makefile.cross-linux-mingw b/Makefile.cross-linux-mingw
index 32a6f2f..d8951eb 100644
--- a/Makefile.cross-linux-mingw
+++ b/Makefile.cross-linux-mingw
@@ -95,6 +95,7 @@ chicken-config.h: chicken-defaults.h
 	echo #define HAVE_LONG_LONG 1 $@
 	echo #define HAVE_MEMMOVE 1 $@
 	echo #define HAVE_MEMORY_H 1 $@
+	echo #define HAVE_NO_POSIX_POLL 1 $@
 	echo #define HAVE_STDINT_H 1 $@
 	echo #define HAVE_STDLIB_H 1 $@
 	echo #define HAVE_STRERROR 1 $@
diff --git a/Makefile.cygwin b/Makefile.cygwin
index 376f6b8..f499c90 100644
--- a/Makefile.cygwin
+++ b/Makefile.cygwin
@@ -89,7 +89,6 @@ chicken-config.h: chicken-defaults.h
 	echo #define HAVE_LONG_LONG 1 $@
 	echo #define HAVE_MEMMOVE 1 $@
 	echo #define HAVE_MEMORY_H 1 $@
-	echo #define HAVE_POSIX_POLL 1 $@
 	echo #define HAVE_SIGACTION 1 $@
 	echo #define HAVE_STDINT_H 1 $@
 	echo #define HAVE_STDLIB_H 1 $@
diff --git a/Makefile.haiku b/Makefile.haiku
index a1f5841..7eeec26 100644
--- a/Makefile.haiku
+++ b/Makefile.haiku
@@ -66,7 +66,6 @@ chicken-config.h: chicken-defaults.h
 	echo #define HAVE_LONG_LONG 1 $@
 	echo #define HAVE_MEMMOVE 1 $@
 	echo #define HAVE_MEMORY_H 1 $@
-	echo #define HAVE_POSIX_POLL 1 $@
 	echo #define HAVE_SIGACTION 1 $@
 	echo #define HAVE_SIGSETJMP 1 $@
 	echo #define HAVE_SIGPROCMASK 1 $@
diff --git a/Makefile.hurd b/Makefile.hurd
index 6a97db6..d2f9a1f 100644
--- a/Makefile.hurd
+++ b/Makefile.hurd
@@ -67,7 +67,6 @@ chicken-config.h: chicken-defaults.h
 	echo #define HAVE_LONG_LONG 1 $@
 	echo #define HAVE_MEMMOVE 1 $@
 	echo #define HAVE_MEMORY_H 1 $@
-	echo #define HAVE_POSIX_POLL 1 $@
 	echo #define HAVE_SIGACTION 1 $@
 	echo #define HAVE_SIGSETJMP 1 $@
 	echo #define HAVE_SIGPROCMASK 1 $@
diff --git a/Makefile.ios b/Makefile.ios
index 6f82e00..6c99c47 100644
--- a/Makefile.ios
+++ b/Makefile.ios
@@ -73,7 +73,6 @@ chicken-config.h: chicken-defaults.h
 	echo #define HAVE_LONG_LONG 1 $@
 	echo #define 

[Chicken-hackers] [PATCH] Don't enable debugging on Android by default

2014-08-04 Thread Moritz Heidkamp
This was probably accidentally left in when generating the Android
patch.
-- 
bevuta IT GmbH - professionelle IT-Lösungen
Marktstraße 10 | http://www.bevuta.com/ | HRB 62476 AG Köln
50968 Köln | Tel.: +49 221 282678-0 | Geschäftsführer: Pablo Beyen
From 8d21fae15e69c65d0b3d1e721de557588f0a4dfa Mon Sep 17 00:00:00 2001
From: Moritz Heidkamp moritz.heidk...@bevuta.com
Date: Mon, 4 Aug 2014 18:29:26 +0200
Subject: [PATCH] Don't enable debugging on Android by default

---
 runtime.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/runtime.c b/runtime.c
index 1a68906..8608506 100644
--- a/runtime.c
+++ b/runtime.c
@@ -640,10 +640,6 @@ int CHICKEN_initialize(int heap, int stack, int symbols, void *toplevel)
   if(chicken_is_initialized) return 1;
   else chicken_is_initialized = 1;
 
-#ifdef __ANDROID__
-  debug_mode = 2;
-#endif
-
   if(debug_mode) 
 C_dbg(C_text(debug), C_text(application startup...\n));
 
-- 
1.9.4

___
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers


Re: [Chicken-hackers] [PATCH] Don't enable debugging on Android by default

2014-08-04 Thread Felix Winkelmann
From: Moritz Heidkamp moritz.heidk...@bevuta.com
Subject: [Chicken-hackers] [PATCH] Don't enable debugging on Android by default
Date: Mon, 04 Aug 2014 18:30:44 +0200

 This was probably accidentally left in when generating the Android
 patch.

That's mostly correct - I thought it might be handy, since the adb-log
is all one has for debugging an app on android, but for production use
it's probably a bit much.


felix

___
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers