Hi all,
With the removal of the typed stream inclusion (r31248), we get new
warnings (e.g. implicit memset, memcpy etc.) in GNUstep-based code
because string.h is not imported transparently anymore.
Previously NSObject.h was importing objc/typedstream.h which itself
imported objc/hash.h which was the one importing string.h. So by
through Foundation.h we were getting string.h automatically.
Instead of keeping things as is, I suggest to include string.h in
Foundation.h (or NSObject.h possibily but unlikely). But a better
solution would be to move CoreBase into Base to offer a better
compatibility with Mac OS X out of the box. The CoreBase compilation
would be still be an option that can be turned off.
By default, CoreFoundation.h brings all these:
#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>
This explains why when you port Cocoa code to GNUstep you often have
to add various includes to get the code working or eliminate the
warnings. Apple also offers the option to disable this automatic C
inclusions with CF_EXCLUDE_CSTD_HEADERS.
Would merging CoreBase into Base be ok or should we rather just import
string.h in Foundation.h until the matter has been better discussed?
Quentin.
_______________________________________________
Gnustep-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnustep-dev