mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-02 09:31:07 +00:00
Simplify source by usuing autoconf
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30692 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e574fe480c
commit
23b7ff95cd
14 changed files with 11439 additions and 10510 deletions
18
ChangeLog
18
ChangeLog
|
@ -1,3 +1,21 @@
|
||||||
|
2010-06-12 Yavor Doganov
|
||||||
|
|
||||||
|
* Source/NSZone.m:
|
||||||
|
* Source/GSPThread.h:
|
||||||
|
* Source/objc-load.h:
|
||||||
|
* Source/objc-load.m:
|
||||||
|
* Source/NSException.m:
|
||||||
|
* Source/ObjectiveC2/sync.m:
|
||||||
|
* Source/NSString.m:
|
||||||
|
* Source/NSDecimalNumber.m:
|
||||||
|
* Source/NSDecimal.m:
|
||||||
|
* Source/NSLock.m:
|
||||||
|
* configure.ac: Use autoconf AC_USE_SYSTEM_EXTENSIONS
|
||||||
|
* configure: Regenerate
|
||||||
|
* Headers/Additions/GNUstepBase/config.h.in: Regenerate
|
||||||
|
Simplification of source code by using autoconf to enable extensions
|
||||||
|
for Unix98 thread handling etc.
|
||||||
|
|
||||||
2010-06-11 Riccardo Mottola
|
2010-06-11 Riccardo Mottola
|
||||||
|
|
||||||
* Source/NSZone.m
|
* Source/NSZone.m
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
/* Headers/Additions/GNUstepBase/config.h.in. Generated from configure.ac by autoheader. */
|
/* Headers/Additions/GNUstepBase/config.h.in. Generated from configure.ac by autoheader. */
|
||||||
|
|
||||||
|
/* Define if building universal (internal helper macro) */
|
||||||
|
#undef AC_APPLE_UNIVERSAL_BUILD
|
||||||
|
|
||||||
/* Define if SO_REUSEADDR is broken on this system */
|
/* Define if SO_REUSEADDR is broken on this system */
|
||||||
#undef BROKEN_SO_REUSEADDR
|
#undef BROKEN_SO_REUSEADDR
|
||||||
|
|
||||||
|
@ -651,31 +654,31 @@
|
||||||
/* Define to 1 if the `setpgrp' function takes no argument. */
|
/* Define to 1 if the `setpgrp' function takes no argument. */
|
||||||
#undef SETPGRP_VOID
|
#undef SETPGRP_VOID
|
||||||
|
|
||||||
/* The size of a `double', as computed by sizeof. */
|
/* The size of `double', as computed by sizeof. */
|
||||||
#undef SIZEOF_DOUBLE
|
#undef SIZEOF_DOUBLE
|
||||||
|
|
||||||
/* The size of a `float', as computed by sizeof. */
|
/* The size of `float', as computed by sizeof. */
|
||||||
#undef SIZEOF_FLOAT
|
#undef SIZEOF_FLOAT
|
||||||
|
|
||||||
/* The size of a `int', as computed by sizeof. */
|
/* The size of `int', as computed by sizeof. */
|
||||||
#undef SIZEOF_INT
|
#undef SIZEOF_INT
|
||||||
|
|
||||||
/* The size of a `long', as computed by sizeof. */
|
/* The size of `long', as computed by sizeof. */
|
||||||
#undef SIZEOF_LONG
|
#undef SIZEOF_LONG
|
||||||
|
|
||||||
/* The size of a `long long', as computed by sizeof. */
|
/* The size of `long long', as computed by sizeof. */
|
||||||
#undef SIZEOF_LONG_LONG
|
#undef SIZEOF_LONG_LONG
|
||||||
|
|
||||||
/* The size of a `pthread_cond_t', as computed by sizeof. */
|
/* The size of `pthread_cond_t', as computed by sizeof. */
|
||||||
#undef SIZEOF_PTHREAD_COND_T
|
#undef SIZEOF_PTHREAD_COND_T
|
||||||
|
|
||||||
/* The size of a `pthread_mutex_t', as computed by sizeof. */
|
/* The size of `pthread_mutex_t', as computed by sizeof. */
|
||||||
#undef SIZEOF_PTHREAD_MUTEX_T
|
#undef SIZEOF_PTHREAD_MUTEX_T
|
||||||
|
|
||||||
/* The size of a `short', as computed by sizeof. */
|
/* The size of `short', as computed by sizeof. */
|
||||||
#undef SIZEOF_SHORT
|
#undef SIZEOF_SHORT
|
||||||
|
|
||||||
/* The size of a `void*', as computed by sizeof. */
|
/* The size of `void*', as computed by sizeof. */
|
||||||
#undef SIZEOF_VOIDP
|
#undef SIZEOF_VOIDP
|
||||||
|
|
||||||
/* Define to 1 if you have the ANSI C header files. */
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
|
@ -687,15 +690,55 @@
|
||||||
/* Define if using the libffi library for invocations */
|
/* Define if using the libffi library for invocations */
|
||||||
#undef USE_LIBFFI
|
#undef USE_LIBFFI
|
||||||
|
|
||||||
|
/* Enable extensions on AIX 3, Interix. */
|
||||||
|
#ifndef _ALL_SOURCE
|
||||||
|
# undef _ALL_SOURCE
|
||||||
|
#endif
|
||||||
|
/* Enable GNU extensions on systems that have them. */
|
||||||
|
#ifndef _GNU_SOURCE
|
||||||
|
# undef _GNU_SOURCE
|
||||||
|
#endif
|
||||||
|
/* Enable threading extensions on Solaris. */
|
||||||
|
#ifndef _POSIX_PTHREAD_SEMANTICS
|
||||||
|
# undef _POSIX_PTHREAD_SEMANTICS
|
||||||
|
#endif
|
||||||
|
/* Enable extensions on HP NonStop. */
|
||||||
|
#ifndef _TANDEM_SOURCE
|
||||||
|
# undef _TANDEM_SOURCE
|
||||||
|
#endif
|
||||||
|
/* Enable general extensions on Solaris. */
|
||||||
|
#ifndef __EXTENSIONS__
|
||||||
|
# undef __EXTENSIONS__
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Define if vasprintf returns the length printed */
|
/* Define if vasprintf returns the length printed */
|
||||||
#undef VASPRINTF_RETURNS_LENGTH
|
#undef VASPRINTF_RETURNS_LENGTH
|
||||||
|
|
||||||
/* Define if vsprintf returns the length printed */
|
/* Define if vsprintf returns the length printed */
|
||||||
#undef VSPRINTF_RETURNS_LENGTH
|
#undef VSPRINTF_RETURNS_LENGTH
|
||||||
|
|
||||||
/* Define to 1 if your processor stores words with the most significant byte
|
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||||
first (like Motorola and SPARC, unlike Intel and VAX). */
|
significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||||
#undef WORDS_BIGENDIAN
|
#if defined AC_APPLE_UNIVERSAL_BUILD
|
||||||
|
# if defined __BIG_ENDIAN__
|
||||||
|
# define WORDS_BIGENDIAN 1
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# ifndef WORDS_BIGENDIAN
|
||||||
|
# undef WORDS_BIGENDIAN
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define to 1 if on MINIX. */
|
||||||
|
#undef _MINIX
|
||||||
|
|
||||||
|
/* Define to 2 if the system does not provide POSIX.1 features except with
|
||||||
|
this defined. */
|
||||||
|
#undef _POSIX_1_SOURCE
|
||||||
|
|
||||||
|
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
||||||
|
#undef _POSIX_SOURCE
|
||||||
|
|
||||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||||
|
@ -703,5 +746,5 @@
|
||||||
#undef inline
|
#undef inline
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||||
#undef size_t
|
#undef size_t
|
||||||
|
|
|
@ -23,40 +23,29 @@
|
||||||
#ifndef _GSPThread_h_
|
#ifndef _GSPThread_h_
|
||||||
#define _GSPThread_h_
|
#define _GSPThread_h_
|
||||||
|
|
||||||
/*
|
|
||||||
* Since glibc does not enable Unix98 extensions by default, we need to tell it
|
|
||||||
* to do so explicitly. That support is switched on by _XOPEN_SOURCE and
|
|
||||||
* __USE_UNIX98 is an internal flag which can cause trouble if enabled alone.
|
|
||||||
* For safety we enable this only on linux and hurd where glibc is likely.
|
|
||||||
* We include features.h explicitely to avoid weird problems.
|
|
||||||
*/
|
|
||||||
#if defined __linux__ || defined __GNU__ || defined __GLIBC__
|
|
||||||
# ifndef _XOPEN_SOURCE
|
|
||||||
# define _XOPEN_SOURCE 600
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Macro to initialize recursive mutexes in a portable way. Adopted from
|
* Macro to initialize recursive mutexes in a portable way. Adopted from
|
||||||
* libobjc2 (lock.h).
|
* libobjc2 (lock.h).
|
||||||
*/
|
*/
|
||||||
# ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
|
# ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
|
||||||
# define GS_INIT_RECURSIVE_MUTEX(x) x = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
|
# define GS_INIT_RECURSIVE_MUTEX(x) \
|
||||||
# elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
|
x = (pthread_mutex_t) PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
|
||||||
# define GS_INIT_RECURSIVE_MUTEX(x) x = PTHREAD_RECURSIVE_MUTEX_INITIALIZER
|
# elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
|
||||||
# else
|
# define GS_INIT_RECURSIVE_MUTEX(x) \
|
||||||
# define GS_INIT_RECURSIVE_MUTEX(x) GSPThreadInitRecursiveMutex(&(x))
|
x = (pthread_mutex_t) PTHREAD_RECURSIVE_MUTEX_INITIALIZER
|
||||||
|
# else
|
||||||
|
# define GS_INIT_RECURSIVE_MUTEX(x) GSPThreadInitRecursiveMutex(&(x))
|
||||||
|
|
||||||
static inline void GSPThreadInitRecursiveMutex(pthread_mutex_t *x)
|
static inline void GSPThreadInitRecursiveMutex(pthread_mutex_t *x)
|
||||||
{
|
{
|
||||||
pthread_mutexattr_t recursiveAttributes;
|
pthread_mutexattr_t recursiveAttributes;
|
||||||
pthread_mutexattr_init(&recursiveAttributes);
|
pthread_mutexattr_init(&recursiveAttributes);
|
||||||
pthread_mutexattr_settype(&recursiveAttributes, PTHREAD_MUTEX_RECURSIVE);
|
pthread_mutexattr_settype(&recursiveAttributes, PTHREAD_MUTEX_RECURSIVE);
|
||||||
pthread_mutex_init(x, &recursiveAttributes);
|
pthread_mutex_init(x, &recursiveAttributes);
|
||||||
pthread_mutexattr_destroy(&recursiveAttributes);
|
pthread_mutexattr_destroy(&recursiveAttributes);
|
||||||
}
|
}
|
||||||
# endif // PTHREAD_RECURSIVE_MUTEX_INITIALIZER(_NP)
|
# endif // PTHREAD_RECURSIVE_MUTEX_INITIALIZER(_NP)
|
||||||
|
|
||||||
#endif // _GSPThread_h_
|
#endif // _GSPThread_h_
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import "common.h"
|
#import "common.h"
|
||||||
#define _GNU_SOURCE
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#if !defined(__APPLE__) || !defined(GNU_RUNTIME)
|
#if !defined(__APPLE__) || !defined(GNU_RUNTIME)
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
|
@ -26,14 +26,10 @@
|
||||||
$Date$ $Revision$
|
$Date$ $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Need to include math.h with C99 option ... do before common.h
|
|
||||||
*/
|
|
||||||
#define _GNU_SOURCE
|
|
||||||
#define _ISOC99_SOURCE
|
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
#import "common.h"
|
#import "common.h"
|
||||||
|
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
#define EXPOSE_NSDecimalNumber_IVARS 1
|
#define EXPOSE_NSDecimalNumber_IVARS 1
|
||||||
#define EXPOSE_NSDecimalNumberHandler_IVARS 1
|
#define EXPOSE_NSDecimalNumberHandler_IVARS 1
|
||||||
#import "Foundation/NSCoder.h"
|
#import "Foundation/NSCoder.h"
|
||||||
|
|
|
@ -121,12 +121,6 @@ GSPrivateBaseAddress(void *addr, void **base)
|
||||||
#endif /* USE_BINUTILS */
|
#endif /* USE_BINUTILS */
|
||||||
#else /* __MINGW__ */
|
#else /* __MINGW__ */
|
||||||
|
|
||||||
#ifndef GNU_SOURCE
|
|
||||||
#define GNU_SOURCE
|
|
||||||
#endif
|
|
||||||
#ifndef __USE_GNU
|
|
||||||
#define __USE_GNU
|
|
||||||
#endif
|
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
|
||||||
#if defined(USE_BINUTILS)
|
#if defined(USE_BINUTILS)
|
||||||
|
|
|
@ -22,17 +22,7 @@
|
||||||
<ignore> All autogsdoc markup is in the header
|
<ignore> All autogsdoc markup is in the header
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#import "common.h"
|
||||||
// This file uses some SUS'98 extensions, so we need to tell glibc not to hide
|
|
||||||
// them. Other platforms have more sensible libcs, which just default to being
|
|
||||||
// standards-compliant.
|
|
||||||
#if defined __linux__ || defined __GNU__ || defined __GLIBC__
|
|
||||||
# ifndef _XOPEN_SOURCE
|
|
||||||
# define _XOPEN_SOURCE 600
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#import "GNUstepBase/GSConfig.h"
|
#import "GNUstepBase/GSConfig.h"
|
||||||
#define gs_cond_t pthread_cond_t
|
#define gs_cond_t pthread_cond_t
|
||||||
|
|
|
@ -43,11 +43,6 @@
|
||||||
Limited choice of default encodings.
|
Limited choice of default encodings.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Needed for visiblity of fwprintf prototype. */
|
|
||||||
#ifndef _GNU_SOURCE
|
|
||||||
#define _GNU_SOURCE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#import "common.h"
|
#import "common.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -86,16 +86,6 @@
|
||||||
|
|
||||||
#define IN_NSZONE_M 1
|
#define IN_NSZONE_M 1
|
||||||
|
|
||||||
/* we define _XOPEN_SOURCE to get all the necessary pthread attributes
|
|
||||||
* and we need to define it here and not just in GSPThread.h because
|
|
||||||
* GLIBC is so picky with defines */
|
|
||||||
#if defined __linux__ || defined __GNU__ || defined __GLIBC__
|
|
||||||
# ifndef _XOPEN_SOURCE
|
|
||||||
# define _XOPEN_SOURCE 600
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#import "common.h"
|
#import "common.h"
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
/* Ensure Unix98 compatible pthreads for glibc */
|
|
||||||
#if defined __linux__ || defined __GNU__ || defined __GLIBC__
|
|
||||||
# ifndef _XOPEN_SOURCE
|
|
||||||
# define _XOPEN_SOURCE 600
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
#include "ObjectiveC2/runtime.h"
|
#include "ObjectiveC2/runtime.h"
|
||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
|
@ -23,7 +23,8 @@
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public
|
You should have received a copy of the GNU Lesser General Public
|
||||||
License along with this library; if not, write to the Free
|
License along with this library; if not, write to the Free
|
||||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
|
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02111 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __objc_load_h_INCLUDE
|
#ifndef __objc_load_h_INCLUDE
|
||||||
|
|
|
@ -32,12 +32,6 @@
|
||||||
|
|
||||||
#import "common.h"
|
#import "common.h"
|
||||||
|
|
||||||
#ifdef HAVE_DLADDR
|
|
||||||
/* Define _GNU_SOURCE because that is required with GNU libc in order
|
|
||||||
* to have dladdr() available. */
|
|
||||||
# define _GNU_SOURCE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <objc/objc-api.h>
|
#include <objc/objc-api.h>
|
||||||
#ifndef NeXT_RUNTIME
|
#ifndef NeXT_RUNTIME
|
||||||
|
|
|
@ -32,6 +32,7 @@ builtin(include, config/codeset.m4)dnl
|
||||||
builtin(include, config/addlibrarypath.m4)dnl
|
builtin(include, config/addlibrarypath.m4)dnl
|
||||||
|
|
||||||
AC_INIT
|
AC_INIT
|
||||||
|
AC_PREREQ([2.60])
|
||||||
AC_CONFIG_SRCDIR([Source/NSArray.m])
|
AC_CONFIG_SRCDIR([Source/NSArray.m])
|
||||||
|
|
||||||
# If GNUSTEP_MAKEFILES is undefined, try to use gnustep-config to determine it.
|
# If GNUSTEP_MAKEFILES is undefined, try to use gnustep-config to determine it.
|
||||||
|
@ -978,6 +979,7 @@ LDFLAGS="$LDFLAGS -L$GNUSTEP_SYSTEM_LIBRARIES -L$GNUSTEP_NETWORK_LIBRARIES -L$GN
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AC_PROG_CPP
|
AC_PROG_CPP
|
||||||
|
AC_USE_SYSTEM_EXTENSIONS
|
||||||
|
|
||||||
AC_PATH_PROG(WHOAMI, whoami, echo, $PATH:/usr/ucb)
|
AC_PATH_PROG(WHOAMI, whoami, echo, $PATH:/usr/ucb)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue