summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMark Mentovai <mmentovai@gmail.com>2009-01-13 15:21:35 +1100
committerHerbert Xu <herbert@gondor.apana.org.au>2009-01-13 15:21:35 +1100
commit45d2ed830766c316138a7910b1bde96e32719349 (patch)
tree5326924cbbd25019920988ca4bd0891be8d02b94 /src
parent[BUILD] Fixed build on NetBSD (diff)
downloaddash-45d2ed830766c316138a7910b1bde96e32719349.tar.gz
dash-45d2ed830766c316138a7910b1bde96e32719349.zip
[BUILD] Fixed build on OS X
Hi, Herbert and friends.  I've created a small patch that allows dash
to be built on Mac OS X.  I'm contributing it here with the hope that
it's suitable for inclusion in dash.

The changes in this patch are:

- __attribute__((__alias__())) is not supported, add an autoconf check
- open64 is not present although the stat64 family is, separate the
  autoconf checks
- A syntax error had slipped into a non-glibc codepath
- mkbuiltins had a nonportable mktemp invocation for the case where
  tempfile is not availalble

Nothing in this patch is actually Mac OS X-specific, so it might aid
portability to other platforms as well.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
-rw-r--r--src/eval.c10
-rw-r--r--src/jobs.c9
2 files changed, 17 insertions, 2 deletions
diff --git a/src/eval.c b/src/eval.c
index 77291b4..0b449ee 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -326,7 +326,15 @@ exexit:
 #if !defined(__alpha__) || (defined(__GNUC__) && __GNUC__ >= 3)
 STATIC
 #endif
-void evaltreenr(union node *, int) __attribute__ ((alias("evaltree")));
+void evaltreenr(union node *n, int flags)
+#ifdef HAVE_ATTRIBUTE_ALIAS
+	__attribute__ ((alias("evaltree")));
+#else
+{
+	evaltree(n, flags);
+	abort();
+}
+#endif
 
 
 STATIC void
diff --git a/src/jobs.c b/src/jobs.c
index 40dc8f6..2b6a752 100644
--- a/src/jobs.c
+++ b/src/jobs.c
@@ -361,7 +361,14 @@ fgcmd(int argc, char **argv)
 	return retval;
 }
 
-int bgcmd(int, char **) __attribute__((__alias__("fgcmd")));
+int bgcmd(int argc, char **argv)
+#ifdef HAVE_ALIAS_ATTRIBUTE
+	__attribute__((__alias__("fgcmd")));
+#else
+{
+	return fgcmd(argc, argv);
+}
+#endif
 
 
 STATIC int
-06-30 12:09:04 -0400'>2024-06-30Accommodate lower-case .jpg filesJune McEnroe 2024-06-23Add another BACKXWASH showJune McEnroe It was good! 2024-06-16Update bioJune McEnroe 2024-06-15Add photo descriptions from June 12June McEnroe 2024-06-10Add first roll of film from June 8June McEnroe 2024-06-10Cope with not having an EXIF infoJune McEnroe 2024-06-10Resize using target pixel counts for consistencyJune McEnroe This will resize film scans to about the same size as for the digital photos. 2024-06-10Add The Girl Who Was Convinced...June McEnroe Not much there. The illustrations are very nice though. 2024-06-09Add photos from May 31June McEnroe 2024-06-09Use monospace on photo pagesJune McEnroe 2024-06-09Put lens and (future) film at the tops of photo pagesJune McEnroe 2024-05-22Remove use of sysexits.hJune McEnroe 2024-05-22Add photo descriptions from 05-03 and 05-06June McEnroe 2024-05-21Fix = precedence in whenJune McEnroe