Improve strict C99 support by explicitly including headers (#275)

* Explicitly include headers in config and tests

* Update ChangeLog
This commit is contained in:
Hugo Melder 2022-09-15 12:24:49 +02:00 committed by GitHub
parent 15b97442cb
commit 63703e0a80
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 0 deletions

View file

@ -1,3 +1,11 @@
2022-09-15 Hugo Melder <contact@hugomelder.com>
* config/config.constant-string-class.m:
* Tests/base/NSObject/initialize.m:
* Tests/base/NSTask/launch.m:
C99 does not support implicit function declarations. Add string.h
and unistd.h when applicable.
2022-08-16 Hugo Melder <contact@hugomelder.com>
* Source/NSPredicate.m:

View file

@ -4,6 +4,10 @@
#include <signal.h>
#import "Testing.h"
#if defined(SIGALRM)
#include <unistd.h>
#endif
@interface Init0 : NSObject
@end

View file

@ -6,6 +6,10 @@
#import "ObjectTesting.h"
#if !defined(_WIN32)
#include <unistd.h>
#endif
int main()
{
NSAutoreleasePool *arp = [NSAutoreleasePool new];

View file

@ -16,6 +16,7 @@
as an option to gcc. If it doesn't work, it means your gcc doesn't
support this option. */
#include <string.h>
#include "objc-common.g"
#ifdef __OBJC_GNUSTEP_RUNTIME_ABI__