ObjFW  Check-in [3631d46ccc]

Overview
Comment:Move ObjFW definitions to a header that gets installed.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 3631d46ccc76304c2463f8a4d3e147ff9fbf870d9b81d4f1baa0f592aa670ec3
User & Date: js on 2009-12-06 14:06:07
Other Links: manifest | tags
Context
2009-12-06
14:13
Add README. check-in: ed2c649ede user: js tags: trunk
14:06
Move ObjFW definitions to a header that gets installed. check-in: 3631d46ccc user: js tags: trunk
00:27
Remove two method implementations not used anymore. check-in: a0a5ecf01f user: js tags: trunk
Changes

Modified configure.ac from [da87975601] to [05facc1731].

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
AX_CHECK_COMPILER_FLAGS(-pipe, [OBJCFLAGS="$OBJCFLAGS -pipe"])
AX_CHECK_COMPILER_FLAGS(-fno-common, [OBJCFLAGS="$OBJCFLAGS -fno-common"])
AX_CHECK_COMPILER_FLAGS(-fno-constant-cfstrings, [
	NO_CONST_CFSTRINGS="-fno-constant-cfstrings"
	OBJCFLAGS="$OBJCFLAGS -fno-constant-cfstrings"])
AC_SUBST(NO_CONST_CFSTRINGS)

AC_DEFINE(OF_CONFIGURED, 1, [Define so that we know we got our config.h])

AC_MSG_CHECKING(which Objective C runtime we use)
dnl TODO: This is ugly. Let's think of a better check.
AC_EGREP_CPP(gnu, [
	#import <objc/objc.h>
	#ifdef __objc_INCLUDE_GNU
	gnu
	#endif







<
<







19
20
21
22
23
24
25


26
27
28
29
30
31
32
AX_CHECK_COMPILER_FLAGS(-pipe, [OBJCFLAGS="$OBJCFLAGS -pipe"])
AX_CHECK_COMPILER_FLAGS(-fno-common, [OBJCFLAGS="$OBJCFLAGS -fno-common"])
AX_CHECK_COMPILER_FLAGS(-fno-constant-cfstrings, [
	NO_CONST_CFSTRINGS="-fno-constant-cfstrings"
	OBJCFLAGS="$OBJCFLAGS -fno-constant-cfstrings"])
AC_SUBST(NO_CONST_CFSTRINGS)



AC_MSG_CHECKING(which Objective C runtime we use)
dnl TODO: This is ugly. Let's think of a better check.
AC_EGREP_CPP(gnu, [
	#import <objc/objc.h>
	#ifdef __objc_INCLUDE_GNU
	gnu
	#endif
217
218
219
220
221
222
223
224
225
dnl We don't call AC_PROG_CPP, but only AC_PROG_OBJCPP and set CPP to OBJCPP
dnl and add OBJCPPFLAGS to CPPFLAGS, thus we need to AC_SUBST these ourself
AC_SUBST(CPP)
AC_SUBST(CPPFLAGS)

AC_SUBST(PACKAGE, ObjFW)
AC_CONFIG_FILES([buildsys.mk extra.mk objfw-config])
AC_CONFIG_HEADERS(config.h)
AC_OUTPUT







|

215
216
217
218
219
220
221
222
223
dnl We don't call AC_PROG_CPP, but only AC_PROG_OBJCPP and set CPP to OBJCPP
dnl and add OBJCPPFLAGS to CPPFLAGS, thus we need to AC_SUBST these ourself
AC_SUBST(CPP)
AC_SUBST(CPPFLAGS)

AC_SUBST(PACKAGE, ObjFW)
AC_CONFIG_FILES([buildsys.mk extra.mk objfw-config])
AC_CONFIG_HEADERS([config.h src/objfw-defs.h])
AC_OUTPUT

Modified objfw-config.in from [bf9a8103d2] to [c7925e42b7].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
prefix="@prefix@"
exec_prefix="@exec_prefix@"
libdir="@libdir@"
CFLAGS=""
CPPFLAGS="-I@includedir@ -DOF_CONFIGURED @RUNTIME_DEF@ @ENDIANESS_DEF@"
CPPFLAGS="$CPPFLAGS @ASPRINTF_DEF@ @OFPLUGINS_DEF@"
CXXFLAGS=""
OBJCFLAGS="-fobjc-exceptions -fconstant-string-class=OFConstString"
OBJCFLAGS="$OBJCFLAGS @NO_CONST_CFSTRINGS@ @NO_WARN_UNUSED@"
LDFLAGS=""
LDFLAGS_RPATH="@LDFLAGS_RPATH@"
LIBS="-L${libdir} -lobjfw @LIBS@"
VERSION="0.1"





|
<







1
2
3
4
5
6

7
8
9
10
11
12
13
#!/bin/sh
prefix="@prefix@"
exec_prefix="@exec_prefix@"
libdir="@libdir@"
CFLAGS=""
CPPFLAGS="-I@includedir@"

CXXFLAGS=""
OBJCFLAGS="-fobjc-exceptions -fconstant-string-class=OFConstString"
OBJCFLAGS="$OBJCFLAGS @NO_CONST_CFSTRINGS@ @NO_WARN_UNUSED@"
LDFLAGS=""
LDFLAGS_RPATH="@LDFLAGS_RPATH@"
LIBS="-L${libdir} -lobjfw @LIBS@"
VERSION="0.1"

Modified src/Makefile from [27ef99309a] to [a627df95af].

28
29
30
31
32
33
34

35
36
37
38
39
40
41
42
43
44
45
46
47
48
       OFURLEncoding.m		\
       OFXMLElement.m		\
       OFXMLParser.m		\
       unicode.m

INCLUDES := ${SRCS:.m=.h}	\
	    OFMacros.h		\

	    asprintf.h		\
	    ObjFW.h		\
	    threading.h

SRCS += ${OBJC_SYNC_M}	\
	${ASPRINTF_M}	\
	iso_8859_15.m	\
	windows_1252.m

include ../buildsys.mk

CPPFLAGS += -I..
OBJCFLAGS += ${LIB_CFLAGS}
LD = ${OBJC}







>

|












28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
       OFURLEncoding.m		\
       OFXMLElement.m		\
       OFXMLParser.m		\
       unicode.m

INCLUDES := ${SRCS:.m=.h}	\
	    OFMacros.h		\
	    ObjFW.h		\
	    asprintf.h		\
	    objfw-defs.h	\
	    threading.h

SRCS += ${OBJC_SYNC_M}	\
	${ASPRINTF_M}	\
	iso_8859_15.m	\
	windows_1252.m

include ../buildsys.mk

CPPFLAGS += -I..
OBJCFLAGS += ${LIB_CFLAGS}
LD = ${OBJC}

Modified src/OFMacros.h from [08c33bc369] to [c7622317c1].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
 * Copyright (c) 2008 - 2009
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#ifndef OF_CONFIGURED
#error You are missing the ObjFW definitions!
#error Please use objfw-config!
#endif

#include <stddef.h>
#include <stdint.h>

#ifdef __GNUC__
#define OF_INLINE inline __attribute__((always_inline))
#define OF_LIKELY(cond) __builtin_expect(!!(cond), 1)











<
<
|
<







1
2
3
4
5
6
7
8
9
10
11


12

13
14
15
16
17
18
19
/*
 * Copyright (c) 2008 - 2009
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */



#import "objfw-defs.h"


#include <stddef.h>
#include <stdint.h>

#ifdef __GNUC__
#define OF_INLINE inline __attribute__((always_inline))
#define OF_LIKELY(cond) __builtin_expect(!!(cond), 1)

Modified src/OFObject.h from [310003f809] to [952a3ddb87].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
 * Copyright (c) 2008 - 2009
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#ifndef OF_CONFIGURED
#error You are missing the ObjFW definitions!
#error Please use objfw-config!
#endif

#include <stddef.h>
#include <stdint.h>

#import <objc/objc.h>

/**











<
<
|
<







1
2
3
4
5
6
7
8
9
10
11


12

13
14
15
16
17
18
19
/*
 * Copyright (c) 2008 - 2009
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */



#import "objfw-defs.h"


#include <stddef.h>
#include <stdint.h>

#import <objc/objc.h>

/**

Modified src/asprintf.h from [ded1b7d5c2] to [90697b51e3].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
 * Copyright (c) 2008 - 2009
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#ifndef OF_CONFIGURED
#error You are missing the ObjFW definitions!
#error Please use objfw-config!
#endif

#ifndef OF_HAVE_ASPRINTF
#include <stdarg.h>

extern int asprintf(char**, const char*, ...);
extern int vasprintf(char**, const char*, va_list);
#endif











<
<
|
<







1
2
3
4
5
6
7
8
9
10
11


12

13
14
15
16
17
18
19
/*
 * Copyright (c) 2008 - 2009
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */



#import "objfw-defs.h"


#ifndef OF_HAVE_ASPRINTF
#include <stdarg.h>

extern int asprintf(char**, const char*, ...);
extern int vasprintf(char**, const char*, va_list);
#endif

Added src/objfw-defs.h.in version [b3fd317650].













>
>
>
>
>
>
1
2
3
4
5
6
#undef OF_APPLE_RUNTIME
#undef OF_BIG_ENDIAN
#undef OF_GNU_RUNTIME
#undef OF_HAVE_ASPRINTF
#undef OF_PLUGINS
#undef SIZE_MAX