mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-02 09:31:07 +00:00
try to integerate Riccardo's inttypes patch
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37313 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
18c8dcfbf9
commit
6b04d159b4
8 changed files with 55 additions and 31 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
||||||
|
2012-10-29 Riccardo Mottola <rm@gnu.org>
|
||||||
|
|
||||||
|
* configure.ac:
|
||||||
|
* Headers/GNUstepBase/GSConfig.h.in:
|
||||||
|
* Headers/GNUstepBase/GSTypeEncoding.h:
|
||||||
|
* Headers/GNUstepBase/GNUstep.h:
|
||||||
|
* Headers/Foundation/NSString.h:
|
||||||
|
* Headers/Foundation/NSObjCRuntime.h:
|
||||||
|
* configure: regenerate
|
||||||
|
Use inttypes.h rather than stdint.h as it's more inclusive and works
|
||||||
|
on Solaris where some defines are in the wrong place.
|
||||||
|
|
||||||
2013-10-29 Richard Frith-Macdonald <rfm@gnu.org>
|
2013-10-29 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/NSTimeZone.m: Implement -hash as the hash of the time zone
|
* Source/NSTimeZone.m: Implement -hash as the hash of the time zone
|
||||||
|
|
|
@ -35,15 +35,14 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdarg.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <limits.h>
|
|
||||||
#include <float.h>
|
|
||||||
|
|
||||||
#import <GNUstepBase/GSVersionMacros.h>
|
#import <GNUstepBase/GSVersionMacros.h>
|
||||||
#import <GNUstepBase/GSConfig.h>
|
#import <GNUstepBase/GSConfig.h>
|
||||||
#import <GNUstepBase/GSBlocks.h>
|
#import <GNUstepBase/GSBlocks.h>
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <limits.h>
|
||||||
|
#include <float.h>
|
||||||
|
|
||||||
/* These typedefs must be in place before GSObjCRuntime.h is imported.
|
/* These typedefs must be in place before GSObjCRuntime.h is imported.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -274,7 +274,7 @@ typedef NSUInteger NSStringEncodingConversionOptions;
|
||||||
+ (id) stringWithCString: (const char*)byteString
|
+ (id) stringWithCString: (const char*)byteString
|
||||||
length: (NSUInteger)length;
|
length: (NSUInteger)length;
|
||||||
+ (id) stringWithCString: (const char*)byteString;
|
+ (id) stringWithCString: (const char*)byteString;
|
||||||
+ (id) stringWithFormat: (NSString*)format,... NS_FORMAT_FUNCTION(1,2);
|
+ (id) stringWithFormat: (NSString*)format, ... NS_FORMAT_FUNCTION(1,2);
|
||||||
+ (id) stringWithContentsOfFile:(NSString *)path;
|
+ (id) stringWithContentsOfFile:(NSString *)path;
|
||||||
|
|
||||||
// Initializing Newly Allocated Strings
|
// Initializing Newly Allocated Strings
|
||||||
|
@ -361,7 +361,7 @@ typedef NSUInteger NSStringEncodingConversionOptions;
|
||||||
range: (NSRange)aRange;
|
range: (NSRange)aRange;
|
||||||
|
|
||||||
// Combining Strings
|
// Combining Strings
|
||||||
- (NSString*) stringByAppendingFormat: (NSString*)format,...
|
- (NSString*) stringByAppendingFormat: (NSString*)format, ...
|
||||||
NS_FORMAT_FUNCTION(1,2);
|
NS_FORMAT_FUNCTION(1,2);
|
||||||
- (NSString*) stringByAppendingString: (NSString*)aString;
|
- (NSString*) stringByAppendingString: (NSString*)aString;
|
||||||
|
|
||||||
|
@ -750,7 +750,7 @@ typedef NSUInteger NSStringEncodingConversionOptions;
|
||||||
+ (id) stringWithContentsOfURL: (NSURL*)url;
|
+ (id) stringWithContentsOfURL: (NSURL*)url;
|
||||||
+ (id) stringWithUTF8String: (const char*)bytes;
|
+ (id) stringWithUTF8String: (const char*)bytes;
|
||||||
- (id) initWithFormat: (NSString*)format
|
- (id) initWithFormat: (NSString*)format
|
||||||
locale: (NSDictionary*)locale, ... NS_FORMAT_FUNCTION(1,3);
|
locale: (NSDictionary*)locale, ... NS_FORMAT_FUNCTION(1,3);
|
||||||
- (id) initWithFormat: (NSString*)format
|
- (id) initWithFormat: (NSString*)format
|
||||||
locale: (NSDictionary*)locale
|
locale: (NSDictionary*)locale
|
||||||
arguments: (va_list)argList NS_FORMAT_FUNCTION(1,0);
|
arguments: (va_list)argList NS_FORMAT_FUNCTION(1,0);
|
||||||
|
@ -833,7 +833,7 @@ typedef NSUInteger NSStringEncodingConversionOptions;
|
||||||
+ (id) stringWithCString: (const char*)byteString
|
+ (id) stringWithCString: (const char*)byteString
|
||||||
length: (NSUInteger)length;
|
length: (NSUInteger)length;
|
||||||
+ (id) stringWithCString: (const char*)byteString;
|
+ (id) stringWithCString: (const char*)byteString;
|
||||||
+ (id) stringWithFormat: (NSString*)format,... NS_FORMAT_FUNCTION(1,2);
|
+ (id) stringWithFormat: (NSString*)format, ... NS_FORMAT_FUNCTION(1,2);
|
||||||
+ (id) stringWithContentsOfFile: (NSString*)path;
|
+ (id) stringWithContentsOfFile: (NSString*)path;
|
||||||
+ (NSMutableString*) stringWithCapacity: (NSUInteger)capacity;
|
+ (NSMutableString*) stringWithCapacity: (NSUInteger)capacity;
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,20 @@
|
||||||
#ifndef __GNUSTEP_GNUSTEP_H_INCLUDED_
|
#ifndef __GNUSTEP_GNUSTEP_H_INCLUDED_
|
||||||
#define __GNUSTEP_GNUSTEP_H_INCLUDED_
|
#define __GNUSTEP_GNUSTEP_H_INCLUDED_
|
||||||
|
|
||||||
|
/* Solaris < 10 kludge. */
|
||||||
|
#if defined(__sun__) && defined(__svr4__) && !defined(PRIuPTR)
|
||||||
|
# if defined(__arch64__) || defined (__x86_64__)
|
||||||
|
# define PRIuPTR "lu"
|
||||||
|
# define PRIxPTR "lx"
|
||||||
|
# define PRIdPTR "ld"
|
||||||
|
# else
|
||||||
|
# define PRIuPTR "u"
|
||||||
|
# define PRIxPTR "x"
|
||||||
|
# define PRIdPTR "d"
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* The contents of this file are designed to be usable with either
|
/* The contents of this file are designed to be usable with either
|
||||||
* GNUstep-base or MacOS-X Foundation.
|
* GNUstep-base or MacOS-X Foundation.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -184,7 +184,7 @@ typedef gsuaddr gsaddr;
|
||||||
/*
|
/*
|
||||||
* Ensure some standard types are defined.
|
* Ensure some standard types are defined.
|
||||||
*/
|
*/
|
||||||
@INCLUDE_STDINT@
|
@INCLUDE_INTTYPES@
|
||||||
@DEFINE_INT8_T@
|
@DEFINE_INT8_T@
|
||||||
@DEFINE_UINT8_T@
|
@DEFINE_UINT8_T@
|
||||||
@DEFINE_INT16_T@
|
@DEFINE_INT16_T@
|
||||||
|
@ -381,9 +381,7 @@ typedef struct {
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <inttypes.h>
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Strong has different semantics in GC and ARC modes, so we need to have a
|
// Strong has different semantics in GC and ARC modes, so we need to have a
|
||||||
|
|
|
@ -27,7 +27,8 @@
|
||||||
#ifndef GS_TYPE_ENCODING_H
|
#ifndef GS_TYPE_ENCODING_H
|
||||||
#define GS_TYPE_ENCODING_H
|
#define GS_TYPE_ENCODING_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#import <GNUstepBase/GSVersionMacros.h>
|
||||||
|
#import <GNUstepBase/GSConfig.h>
|
||||||
|
|
||||||
#if defined (NeXT_RUNTIME)
|
#if defined (NeXT_RUNTIME)
|
||||||
# include <objc/objc-runtime.h>
|
# include <objc/objc-runtime.h>
|
||||||
|
|
18
configure
vendored
18
configure
vendored
|
@ -682,7 +682,7 @@ DEFINE_UINT16_T
|
||||||
DEFINE_INT16_T
|
DEFINE_INT16_T
|
||||||
DEFINE_UINT8_T
|
DEFINE_UINT8_T
|
||||||
DEFINE_INT8_T
|
DEFINE_INT8_T
|
||||||
INCLUDE_STDINT
|
INCLUDE_INTTYPES
|
||||||
HAVE_PTS_STREAM_MODULES
|
HAVE_PTS_STREAM_MODULES
|
||||||
OBJCFLAGS
|
OBJCFLAGS
|
||||||
HAVE_OBJC_SYNC_ENTER
|
HAVE_OBJC_SYNC_ENTER
|
||||||
|
@ -19638,18 +19638,18 @@ fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
if test $ac_cv_header_stdint_h = yes; then
|
if test $ac_cv_header_inttypes_h = yes; then
|
||||||
INCLUDE_STDINT="#include <stdint.h>"
|
INCLUDE_INTTYPES="#include <inttypes.h>"
|
||||||
elif test $ac_cv_header_inttypes_h = yes; then
|
|
||||||
INCLUDE_STDINT="#include <inttypes.h>"
|
|
||||||
elif test $ac_cv_header_sys_inttypes_h = yes; then
|
elif test $ac_cv_header_sys_inttypes_h = yes; then
|
||||||
INCLUDE_STDINT="#include <sys/inttypes.h>"
|
INCLUDE_INTTYPES="#include <sys/inttypes.h>"
|
||||||
|
elif test $ac_cv_header_stdint_h = yes; then
|
||||||
|
INCLUDE_INTTYPES="#include <stdint.h>"
|
||||||
else
|
else
|
||||||
INCLUDE_STDINT="no"
|
INCLUDE_INTTYPES="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$INCLUDE_STDINT" = "no"; then
|
if test "$INCLUDE_INTTYPES" = "no"; then
|
||||||
INCLUDE_STDINT=""
|
INCLUDE_INTTYPES=""
|
||||||
DEFINE_INT8_T="#define int8_t gss8"
|
DEFINE_INT8_T="#define int8_t gss8"
|
||||||
DEFINE_UINT8_T="#define uint8_t gsu8"
|
DEFINE_UINT8_T="#define uint8_t gsu8"
|
||||||
DEFINE_INT16_T="#define int16_t gss16"
|
DEFINE_INT16_T="#define int16_t gss16"
|
||||||
|
|
18
configure.ac
18
configure.ac
|
@ -2298,18 +2298,18 @@ AC_CHECK_HEADERS(dnl
|
||||||
stdlib.h dnl
|
stdlib.h dnl
|
||||||
)
|
)
|
||||||
|
|
||||||
if test $ac_cv_header_stdint_h = yes; then
|
if test $ac_cv_header_inttypes_h = yes; then
|
||||||
INCLUDE_STDINT="#include <stdint.h>"
|
INCLUDE_INTTYPES="#include <inttypes.h>"
|
||||||
elif test $ac_cv_header_inttypes_h = yes; then
|
|
||||||
INCLUDE_STDINT="#include <inttypes.h>"
|
|
||||||
elif test $ac_cv_header_sys_inttypes_h = yes; then
|
elif test $ac_cv_header_sys_inttypes_h = yes; then
|
||||||
INCLUDE_STDINT="#include <sys/inttypes.h>"
|
INCLUDE_INTTYPES="#include <sys/inttypes.h>"
|
||||||
|
elif test $ac_cv_header_stdint_h = yes; then
|
||||||
|
INCLUDE_INTTYPES="#include <stdint.h>"
|
||||||
else
|
else
|
||||||
INCLUDE_STDINT="no"
|
INCLUDE_INTTYPES="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$INCLUDE_STDINT" = "no"; then
|
if test "$INCLUDE_INTTYPES" = "no"; then
|
||||||
INCLUDE_STDINT=""
|
INCLUDE_INTTYPES=""
|
||||||
DEFINE_INT8_T="#define int8_t gss8"
|
DEFINE_INT8_T="#define int8_t gss8"
|
||||||
DEFINE_UINT8_T="#define uint8_t gsu8"
|
DEFINE_UINT8_T="#define uint8_t gsu8"
|
||||||
DEFINE_INT16_T="#define int16_t gss16"
|
DEFINE_INT16_T="#define int16_t gss16"
|
||||||
|
@ -2333,7 +2333,7 @@ DEFINE_INTPTR_T=""
|
||||||
DEFINE_UINTPTR_T=""
|
DEFINE_UINTPTR_T=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_SUBST(INCLUDE_STDINT)
|
AC_SUBST(INCLUDE_INTTYPES)
|
||||||
AC_SUBST(DEFINE_INT8_T)
|
AC_SUBST(DEFINE_INT8_T)
|
||||||
AC_SUBST(DEFINE_UINT8_T)
|
AC_SUBST(DEFINE_UINT8_T)
|
||||||
AC_SUBST(DEFINE_INT16_T)
|
AC_SUBST(DEFINE_INT16_T)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue