mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
fixup config test for older clang
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38990 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bb36c3f5a5
commit
11aac47960
3 changed files with 48 additions and 66 deletions
13
ChangeLog
13
ChangeLog
|
@ -1,8 +1,15 @@
|
|||
2015-09-16 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* configure.ac: fix check for pthread setname to work with older
|
||||
versions of clang which object to autoconf checking for the
|
||||
existence of a function by calling it without args.
|
||||
|
||||
2015-09-16 Riccardo Mottola <rm@gnu.org>
|
||||
|
||||
* Headers/Foundation/NSFileManager.h
|
||||
* Source/NSFileManager.m
|
||||
Add simple (files only and no keys handling) implementation of 10.6 method contentsOfDirectoryAtURL.
|
||||
Add simple (files only and no keys handling) implementation
|
||||
of 10.6 method contentsOfDirectoryAtURL.
|
||||
|
||||
2015-09-08 Niels Grewe <niels.grewe@halbordnung.de>
|
||||
|
||||
|
@ -10,8 +17,8 @@
|
|||
|
||||
2015-09-04 Niels Grewe <niels.grewe@halbordnung.de>
|
||||
|
||||
* Source/GSString.m: Optimisation for formatting strings that are stored as
|
||||
UTF-16 (use memcpy instead of looping over the characters).
|
||||
* Source/GSString.m: Optimisation for formatting strings that are
|
||||
stored as UTF-16 (use memcpy instead of looping over the characters).
|
||||
* Tests/base/NSString/unichar_format.m: Test cases for formatting.
|
||||
|
||||
2015-09-01 Niels Grewe <niels.grewe@halbordnung.de>
|
||||
|
|
41
configure
vendored
41
configure
vendored
|
@ -2753,8 +2753,8 @@ if test "$CPPFLAGS" = ""; then
|
|||
export CPPFLAGS
|
||||
else
|
||||
if test "$CPPFLAGS" != "$MAKECPPFLAGS"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are running configure with the link options ($CPPFLAGS) set to a different value from that used by gnustep-make ($MAKECPPFLAGS). To avoid conflicts/problems, reconfigure/reinstall gnustep-make to use CPPFLAGS=$CPPFLAGS or run the gnustep-base configure again with your CPPFLAGS environment variable set to $MAKECPPFLAGS" >&5
|
||||
$as_echo "$as_me: WARNING: You are running configure with the link options ($CPPFLAGS) set to a different value from that used by gnustep-make ($MAKECPPFLAGS). To avoid conflicts/problems, reconfigure/reinstall gnustep-make to use CPPFLAGS=$CPPFLAGS or run the gnustep-base configure again with your CPPFLAGS environment variable set to $MAKECPPFLAGS" >&2;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are running configure with the preprocessor options ($CPPFLAGS) set to a different value from that used by gnustep-make ($MAKECPPFLAGS). To avoid conflicts/problems, reconfigure/reinstall gnustep-make to use CPPFLAGS=$CPPFLAGS or run the gnustep-base configure again with your CPPFLAGS environment variable set to $MAKECPPFLAGS" >&5
|
||||
$as_echo "$as_me: WARNING: You are running configure with the preprocessor options ($CPPFLAGS) set to a different value from that used by gnustep-make ($MAKECPPFLAGS). To avoid conflicts/problems, reconfigure/reinstall gnustep-make to use CPPFLAGS=$CPPFLAGS or run the gnustep-base configure again with your CPPFLAGS environment variable set to $MAKECPPFLAGS" >&2;}
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -7612,24 +7612,8 @@ CFLAGS=$saved_CFLAGS
|
|||
# Check if we can name pthreads
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
for ac_func in pthread_set_name_np
|
||||
do :
|
||||
ac_fn_c_check_func "$LINENO" "pthread_set_name_np" "ac_cv_func_pthread_set_name_np"
|
||||
if test "x$ac_cv_func_pthread_set_name_np" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_PTHREAD_SET_NAME_NP 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
done
|
||||
|
||||
if test $ac_cv_func_pthread_set_name_np = yes; then
|
||||
|
||||
$as_echo "#define PTHREAD_SETNAME(a) (pthread_set_name_np(pthread_self(), a), 0)" >>confdefs.h
|
||||
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_setname_np() variant" >&5
|
||||
$as_echo_n "checking for pthread_setname_np() variant... " >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_setname_np()" >&5
|
||||
$as_echo_n "checking for pthread_setname_np()... " >&6; }
|
||||
if ${gs_cv_pthread_setname_np+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
@ -7688,24 +7672,23 @@ rm -f core conftest.err conftest.$ac_objext \
|
|||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gs_cv_pthread_setname_np" >&5
|
||||
$as_echo "$gs_cv_pthread_setname_np" >&6; }
|
||||
case $gs_cv_pthread_setname_np in
|
||||
darwin)
|
||||
case $gs_cv_pthread_setname_np in
|
||||
darwin)
|
||||
|
||||
$as_echo "#define PTHREAD_SETNAME(a) pthread_setname_np(a)" >>confdefs.h
|
||||
|
||||
;;
|
||||
glibc)
|
||||
;;
|
||||
glibc)
|
||||
|
||||
$as_echo "#define PTHREAD_SETNAME(a) pthread_setname_np(pthread_self(),a)" >>confdefs.h
|
||||
|
||||
;;
|
||||
netbsd)
|
||||
;;
|
||||
netbsd)
|
||||
|
||||
$as_echo "#define PTHREAD_SETNAME(a) pthread_setname_np(pthread_self(),\"%s\",a)" >>confdefs.h
|
||||
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Check whether we can get the system thread ID
|
||||
|
|
60
configure.ac
60
configure.ac
|
@ -1801,42 +1801,34 @@ CFLAGS=$saved_CFLAGS
|
|||
# Check if we can name pthreads
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
AC_CHECK_FUNCS(pthread_set_name_np)
|
||||
if test $ac_cv_func_pthread_set_name_np = yes; then
|
||||
AC_DEFINE(PTHREAD_SETNAME(a), (pthread_set_name_np(pthread_self(), a), 0),
|
||||
[Description: Define set name function for pthread returning void])
|
||||
else
|
||||
AC_CACHE_CHECK(
|
||||
[for pthread_setname_np() variant],
|
||||
[gs_cv_pthread_setname_np],
|
||||
AC_CACHE_CHECK([for pthread_setname_np()], gs_cv_pthread_setname_np,
|
||||
[AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([#include <pthread.h>],
|
||||
[pthread_setname_np("name");])],
|
||||
[gs_cv_pthread_setname_np=darwin],
|
||||
[AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([#include <pthread.h>],
|
||||
[pthread_setname_np(pthread_self(), "name");])],
|
||||
[gs_cv_pthread_setname_np=glibc],
|
||||
[AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([#include <pthread.h>],
|
||||
[pthread_setname_np("name");])],
|
||||
[gs_cv_pthread_setname_np=darwin],
|
||||
[AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([#include <pthread.h>],
|
||||
[pthread_setname_np(pthread_self(), "name");])],
|
||||
[gs_cv_pthread_setname_np=glibc],
|
||||
[AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([#include <pthread.h>],
|
||||
[pthread_setname_np(pthread_self(), "%s", "name");])],
|
||||
[gs_cv_pthread_setname_np=netbsd],
|
||||
[gs_cv_pthread_setname_np=none])])])])
|
||||
case $gs_cv_pthread_setname_np in
|
||||
darwin)
|
||||
AC_DEFINE(PTHREAD_SETNAME(a), pthread_setname_np(a),
|
||||
[Description: Define set name function for pthread with one arg])
|
||||
;;
|
||||
glibc)
|
||||
AC_DEFINE(PTHREAD_SETNAME(a), pthread_setname_np(pthread_self(),a),
|
||||
[Description: Define setname function for pthread with two args])
|
||||
;;
|
||||
netbsd)
|
||||
AC_DEFINE(PTHREAD_SETNAME(a), pthread_setname_np(pthread_self(),"%s",a),
|
||||
[Description: Define setname function for pthread with three args])
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
[pthread_setname_np(pthread_self(), "%s", "name");])],
|
||||
[gs_cv_pthread_setname_np=netbsd],
|
||||
[gs_cv_pthread_setname_np=none])])])])
|
||||
case $gs_cv_pthread_setname_np in
|
||||
darwin)
|
||||
AC_DEFINE(PTHREAD_SETNAME(a), pthread_setname_np(a),
|
||||
[Description: Define set name function for pthread with one arg])
|
||||
;;
|
||||
glibc)
|
||||
AC_DEFINE(PTHREAD_SETNAME(a), pthread_setname_np(pthread_self(),a),
|
||||
[Description: Define setname function for pthread with two args])
|
||||
;;
|
||||
netbsd)
|
||||
AC_DEFINE(PTHREAD_SETNAME(a), pthread_setname_np(pthread_self(),"%s",a),
|
||||
[Description: Define setname function for pthread with three args])
|
||||
;;
|
||||
esac
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Check whether we can get the system thread ID
|
||||
|
|
Loading…
Reference in a new issue