Ignore:
Timestamp:
Jul 27, 2006, 10:45:30 PM (14 years ago)
Author:
pguyot (Paul Guyot)
Message:

Fix darwintrace.c on 10.3 (tentative, no 10.3 box here) by determining with
autoconf if readlink conforms to POSIX 1003.1a as in 10.4+ or not (as in 10.3).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/aclocal.m4

    r17269 r18769  
    822822])
    823823
     824#------------------------------------------------------------------------
     825# DP_CHECK_READLINK_IS_P1003_1A --
     826#
     827#       Check if readlink conforms to POSIX 1003.1a standard, define
     828#       READLINK_IS_NOT_P1003_1A if it doesn't.
     829#
     830# Arguments:
     831#       None.
     832#
     833# Requires:
     834#       None.
     835#
     836# Depends:
     837#               AC_LANG_PROGRAM
     838#
     839# Results:
     840#       Result is cached.
     841#
     842#       If readlink doesn't conform to POSIX 1003.1a, defines the following variables:
     843#               READLINK_IS_NOT_P1003_1A
     844#
     845#------------------------------------------------------------------------
     846AC_DEFUN(DP_CHECK_READLINK_IS_P1003_1A, [
     847        AC_MSG_CHECKING([if readlink conforms to POSIX 1003.1a])
     848
     849        AC_CACHE_VAL(dp_cv_readlink_is_posix_1003_1a, [
     850                AC_COMPILE_IFELSE([
     851                        AC_LANG_PROGRAM([
     852                                        #include <unistd.h>
     853                                        ssize_t readlink(const char *, char *, size_t);
     854                                ], [
     855                        ])
     856                        ], [
     857                                dp_cv_readlink_is_posix_1003_1a="yes"
     858                        ], [
     859                                dp_cv_readlink_is_posix_1003_1a="no"
     860                        ]
     861                )
     862        ])
     863
     864        AC_MSG_RESULT(${dp_cv_readlink_is_posix_1003_1a})
     865
     866        if test x"${dp_cv_readlink_is_posix_1003_1a}" = "xno"; then
     867                AC_DEFINE([READLINK_IS_NOT_P1003_1A], [], [Define to 1 if readlink does not conform with POSIX 1003.1a (where third argument is a size_t and return value is a ssize_t)])
     868        fi
     869
     870        AC_SUBST(READLINK_IS_NOT_P1003_1A)
     871])
Note: See TracChangeset for help on using the changeset viewer.