ObjFW  Check-in [17be12b6e5]

Overview
Comment:Don't define _*_SOURCE

Instead, just define _GNU_SOURCE when __GLIBC__ is defined. After all,
that's the only libc that doesn't work properly without any defines.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 17be12b6e576280bb2e1eb85f1dfff8309191e2cc3a726bc0977a20e8156839e
User & Date: js on 2014-05-15 01:50:04
Other Links: manifest | tags
Context
2014-05-15
03:39
objc_exit(): Fix the first class not being free'd check-in: 428520105b user: js tags: trunk
01:50
Don't define _*_SOURCE check-in: 17be12b6e5 user: js tags: trunk
01:50
Update buildsys check-in: 7b365b7a56 user: js tags: trunk
Changes

Modified configure.ac from [5c05e2c9e7] to [4687ac1097].

177
178
179
180
181
182
183














184
185
186
187
188
189
190

AC_DEFINE_UNQUOTED(PLUGIN_SUFFIX, "$PLUGIN_SUFFIX", [Suffix for plugins])
AS_IF([test x"$PLUGIN_SUFFIX" != x""], [
	AC_SUBST(USE_SRCS_PLUGINS, '${SRCS_PLUGINS}')
	AC_SUBST(TESTPLUGIN, "plugin")
	AC_DEFINE(OF_HAVE_PLUGINS, 1, [Whether we have plugin support])
])















objc_runtime="ObjFW runtime"
AC_CHECK_HEADER(objc/objc.h)
AC_MSG_CHECKING(which Objective C runtime to use)
AC_ARG_ENABLE(runtime,
	AS_HELP_STRING([--enable-runtime], [use the included runtime]))
AC_ARG_ENABLE(seluid24,







>
>
>
>
>
>
>
>
>
>
>
>
>
>







177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204

AC_DEFINE_UNQUOTED(PLUGIN_SUFFIX, "$PLUGIN_SUFFIX", [Suffix for plugins])
AS_IF([test x"$PLUGIN_SUFFIX" != x""], [
	AC_SUBST(USE_SRCS_PLUGINS, '${SRCS_PLUGINS}')
	AC_SUBST(TESTPLUGIN, "plugin")
	AC_DEFINE(OF_HAVE_PLUGINS, 1, [Whether we have plugin support])
])

AC_MSG_CHECKING(whether we need -D_GNU_SOURCE)
AC_EGREP_CPP(yes, [
	#include <stdlib.h>

	#ifdef __GLIBC__
	yes
	#endif
], [
	CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS"
	AC_MSG_RESULT(yes)
], [
	AC_MSG_RESULT(no)
])

objc_runtime="ObjFW runtime"
AC_CHECK_HEADER(objc/objc.h)
AC_MSG_CHECKING(which Objective C runtime to use)
AC_ARG_ENABLE(runtime,
	AS_HELP_STRING([--enable-runtime], [use the included runtime]))
AC_ARG_ENABLE(seluid24,

Modified src/OFDate.m from [64b9648b5e] to [99de8e6f4d].

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#define _POSIX_C_SOURCE 199309L
#define _XOPEN_SOURCE 500

#include "config.h"

#include <stdint.h>
#include <limits.h>
#include <time.h>
#include <math.h>
#include <float.h>







<
<
<







10
11
12
13
14
15
16



17
18
19
20
21
22
23
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */




#include "config.h"

#include <stdint.h>
#include <limits.h>
#include <time.h>
#include <math.h>
#include <float.h>

Modified src/OFFile.m from [70aebcaeb2] to [f31c61d4b5].

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#define _POSIX_C_SOURCE 200112L
#define _XOPEN_SOURCE 600
#define _BSD_SOURCE
#define _NETBSD_SOURCE
#define _DARWIN_C_SOURCE
#define __BSD_VISIBLE 1
#define __NO_EXT_QNX

#include "config.h"

/* Work around a bug with Clang + glibc */
#ifdef __clang__
# define _HAVE_STRING_ARCH_strcmp







<
<
<
<
<
<







10
11
12
13
14
15
16






17
18
19
20
21
22
23
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */







#define __NO_EXT_QNX

#include "config.h"

/* Work around a bug with Clang + glibc */
#ifdef __clang__
# define _HAVE_STRING_ARCH_strcmp

Modified src/OFMapTable.m from [8840bb8cc2] to [3156715ede].

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#define _BSD_SOURCE

#include "config.h"

#include <string.h>

#include <assert.h>

#import "OFMapTable.h"







<
<







10
11
12
13
14
15
16


17
18
19
20
21
22
23
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */



#include "config.h"

#include <string.h>

#include <assert.h>

#import "OFMapTable.h"

Modified src/OFObject.m from [e8aca19951] to [0c79230d37].

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#define _BSD_SOURCE

#include "config.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <assert.h>







<
<







10
11
12
13
14
15
16


17
18
19
20
21
22
23
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */



#include "config.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <assert.h>

Modified src/OFProcess.m from [f1314df72d] to [816fb9bfe7].

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#define _POSIX_SOURCE

#include "config.h"

#include <string.h>

#ifndef _WIN32
# include <unistd.h>
# include <signal.h>







<
<







10
11
12
13
14
15
16


17
18
19
20
21
22
23
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */



#include "config.h"

#include <string.h>

#ifndef _WIN32
# include <unistd.h>
# include <signal.h>

Modified src/OFThread.m from [75412d8593] to [96b5d11fcf].

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#define OF_THREAD_M
#define _POSIX_C_SOURCE 200112L
#define _POSIX_TIMERS
#define __NO_EXT_QNX

#include "config.h"

#include <stdlib.h>
#include <math.h>
#include <time.h>







<
<







11
12
13
14
15
16
17


18
19
20
21
22
23
24
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#define OF_THREAD_M


#define __NO_EXT_QNX

#include "config.h"

#include <stdlib.h>
#include <math.h>
#include <time.h>

Modified src/exceptions/OFAddressTranslationFailedException.m from [2cd958f861] to [978b1ac512].

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#define _BSD_SOURCE

#include "config.h"

#import "OFAddressTranslationFailedException.h"
#import "OFString.h"

#import "common.h"
#import "macros.h"







<
<







10
11
12
13
14
15
16


17
18
19
20
21
22
23
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */



#include "config.h"

#import "OFAddressTranslationFailedException.h"
#import "OFString.h"

#import "common.h"
#import "macros.h"

Modified src/exceptions/OFException.m from [daa1364182] to [d55e878757].

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#define _GNU_SOURCE

#include "config.h"

#include <stdlib.h>

#ifdef HAVE_DLFCN_H
# include <dlfcn.h>
#endif







<
<







10
11
12
13
14
15
16


17
18
19
20
21
22
23
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */



#include "config.h"

#include <stdlib.h>

#ifdef HAVE_DLFCN_H
# include <dlfcn.h>
#endif

Modified src/of_asprintf.m from [b1b058c113] to [db322fe9c1].

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#define _GNU_SOURCE

#include "config.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <stdbool.h>







<
<







10
11
12
13
14
15
16


17
18
19
20
21
22
23
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */



#include "config.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <stdbool.h>