gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Moving CoreBase into Base


From: Quentin Mathé
Subject: Re: Moving CoreBase into Base
Date: Sat, 18 Sep 2010 20:06:30 +0200

Le 18 sept. 2010 à 18:23, Fred Kiefer a écrit :

Am 18.09.2010 17:15, schrieb David Chisnall:
On 17 Sep 2010, at 10:11, Richard Frith-Macdonald wrote:
You could have the gnustep-base package build and install both by
default, but have an easy configure-time option to control exactly
what gets built/installed.

Well, we'll need to install the CoreBase headers anyway if we want
the string.h and other stuff to be included by Foundation.h (as it is
on OS X.

I would like to see CoreBase as a subproject of base and also to have
the additional headers included somewhere. But I would prefer to have
these two things separated. Eric's proposal seemed better to me. That
prefix.h (Or did you actually mean preface.h?) file could then be
included from CoreBase as well.

afaik there is no prefix.h, but preface.h.in is a possibility indeed. Probably better than Foundation.h itself if we don't include CoreFoundation.h in it as Apple does it.

Can I add the following to preface.h.in for now?

#ifndef CF_EXCLUDE_CSTD_HEADERS
#include <sys/types.h>
#include <stdarg.h>
#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <float.h>
#include <limits.h>
#include <locale.h>
#include <math.h>
#include <setjmp.h>
#include <signal.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdint.h>
#endif

We could also introduce an extra header named 'stdc.h' (or some better name) that contains the code above. Then both Foundation and CoreFoundation would install a copy of this header in their header directory and include it too. That would prevent to duplicate the header list in both preface.h.in and CoreFoundation.h. This seems a somewhat cleaner than including CoreFoundation.h in Foundation.h, but requires to import CoreFoundation.h explicitly when you depend on it. Not sure what's the best… I'd be tempted to favor Mac OS X compatibility.

Quentin.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]