changeset 1146:3570984a1015 draft

Regression test against Ancient Build Environment (Ubuntu 8.04), fixup bit-rot.
author Rob Landley <rob@landley.net>
date Thu, 19 Dec 2013 15:02:18 -0600
parents 80c9df5145fe
children 473491dbd8c3
files lib/portability.h scripts/make.sh
diffstat 2 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lib/portability.h	Thu Dec 19 09:32:30 2013 -0600
+++ b/lib/portability.h	Thu Dec 19 15:02:18 2013 -0600
@@ -42,6 +42,10 @@
 #define AT_REMOVEDIR 0x200
 #endif
 
+#ifndef MNT_DETACH
+#define MNT_DETACH 2
+#endif
+
 // We don't define GNU_dammit because we're not part of the gnu project, and
 // don't want to get any FSF on us. Unfortunately glibc (gnu libc)
 // won't give us Linux syscall wrappers without claiming to be part of the
@@ -141,9 +145,10 @@
 #define SWAP_LE64(x) (x)
 #endif
 
-#if defined(__APPLE__) || defined(__ANDROID__)
+#if defined(__APPLE__) || defined(__ANDROID__) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 10)
 ssize_t getdelim(char **lineptr, size_t *n, int delim, FILE *stream);
 ssize_t getline(char **lineptr, size_t *n, FILE *stream);
 #endif
 
+// compile time probes for stuff libc didn't provide
 #include "generated/portability.h"
--- a/scripts/make.sh	Thu Dec 19 09:32:30 2013 -0600
+++ b/scripts/make.sh	Thu Dec 19 15:02:18 2013 -0600
@@ -126,7 +126,9 @@
 
 echo "generated/help.h"
 # Only recreate generated/help.h if python2 is installed. Does not work with 3.
-PYTHON="$(which python2 || which python2.6 || which python2.7)"
+[ -z "$(python --version | grep 'Python 2')" ] &&
+  PYTHON="$(which python2 || which python2.6 || which python2.7)" ||
+  PYTHON=python
 if [ ! -z "$(grep 'CONFIG_TOYBOX_HELP=y' $KCONFIG_CONFIG)" ];
 then
   if [ -z "$PYTHON" ];