From 45d2ed830766c316138a7910b1bde96e32719349 Mon Sep 17 00:00:00 2001 From: Mark Mentovai Date: Tue, 13 Jan 2009 15:21:35 +1100 Subject: [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 --- configure.ac | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 221b839..f46e260 100644 --- a/configure.ac +++ b/configure.ac @@ -18,6 +18,18 @@ fi AC_MSG_RESULT(${CC_FOR_BUILD}) AC_SUBST(CC_FOR_BUILD) +AC_MSG_CHECKING([for __attribute__((__alias__()))]) +dash_cv_have_attribute_alias=no +AC_LINK_IFELSE([AC_LANG_PROGRAM([void t() {} + void a() __attribute__((__alias__("t")));], + [a();])], + [dash_cv_have_attribute_alias=yes]) +AC_MSG_RESULT($dash_cv_have_attribute_alias) +if test "x$dash_cv_have_attribute_alias" = xyes; then + AC_DEFINE([HAVE_ALIAS_ATTRIBUTE], 1, + [Define if __attribute__((__alias__())) is supported]) +fi + AC_ARG_ENABLE(static, AS_HELP_STRING(--enable-static, \ [Build statical linked program])) if test "$enable_static" = "yes"; then @@ -60,6 +72,9 @@ AC_CHECK_FUNC(stat64,, [ AC_DEFINE(fstat64, fstat, [64-bit operations are the same as 32-bit]) AC_DEFINE(lstat64, lstat, [64-bit operations are the same as 32-bit]) AC_DEFINE(stat64, stat, [64-bit operations are the same as 32-bit]) +]) + +AC_CHECK_FUNC(open64,, [ AC_DEFINE(open64, open, [64-bit operations are the same as 32-bit]) ]) -- cgit 1.4.1 f='/pounce/log/extra?h=3.0&id=16ae4d6f42a8f3502e5c596568ec7a9bd69ce909'>unfollow)
Commit message (Expand)Author
2021-06-09Use seprintf for reserializeJune McEnroe
2021-06-09Use seprintf for capListJune McEnroe
2021-06-09Add seprintfJune McEnroe
2021-05-27Add pounce-notify to README 2.4June McEnroe
2021-05-27Fix ENVIRONMENT formatting in pounce-notify(1)June McEnroe
2021-05-27Add note about Libera.Chat SASL-only rangesJune McEnroe
2021-05-25Add QUIRKS fileJune McEnroe
2021-05-19Replace freenode with tilde.chatJune McEnroe
2021-05-04notify: Reword pounce-notify manualJune McEnroe
2021-05-02Clean up Makefiles, configure scriptsJune McEnroe
2021-04-30palaver: Exit on getopt failureJune McEnroe
2021-04-30notify: Implement pounce-notifyJune McEnroe