From 596c571ab1db9282ff632eb56c15cfc04e1671ae Mon Sep 17 00:00:00 2001 From: Michael McConville Date: Wed, 24 Feb 2016 12:04:04 -0500 Subject: [PATCH] sizeof(char) is always 1 POSIX and ANSI specify that char is always 1 byte, and I'm almost certain that no systems violate this. Regardless, the SIZEOF_CHAR macro is never used. --- racket/src/foreign/foreign.c | 4 ---- racket/src/foreign/foreign.rktc | 7 ------- racket/src/racket/mzconfig.h.in | 3 --- racket/src/worksp/mzconfig.h | 3 --- 4 files changed, 17 deletions(-) diff --git a/racket/src/foreign/foreign.c b/racket/src/foreign/foreign.c index 383e9589ae..b4b6b4125d 100644 --- a/racket/src/foreign/foreign.c +++ b/racket/src/foreign/foreign.c @@ -26,12 +26,8 @@ #endif /* WINDOWS_DYNAMIC_LOAD */ #if !defined(WINDOWS_DYNAMIC_LOAD) || defined(__MINGW32__) -# if SIZEOF_CHAR == 1 typedef signed char Tsint8; typedef unsigned char Tuint8; -# else -# error "configuration error, please contact PLT (int8)" -# endif # if SIZEOF_SHORT == 2 typedef signed short Tsint16; diff --git a/racket/src/foreign/foreign.rktc b/racket/src/foreign/foreign.rktc index 7fa9356d56..fc30f8634e 100755 --- a/racket/src/foreign/foreign.rktc +++ b/racket/src/foreign/foreign.rktc @@ -29,13 +29,6 @@ exec racket "$0" > `echo "$0" | sed 's/rktc$/c/'` "$0" } @@@IF{!defined(WINDOWS_DYNAMIC_LOAD) || defined(__MINGW32__)}{ -# if SIZEOF_CHAR == 1 - typedef signed char Tsint8; - typedef unsigned char Tuint8; -# else -# error "configuration error, please contact PLT (int8)" -# endif - # if SIZEOF_SHORT == 2 typedef signed short Tsint16; typedef unsigned short Tuint16; diff --git a/racket/src/racket/mzconfig.h.in b/racket/src/racket/mzconfig.h.in index c110bdd358..44253e9477 100644 --- a/racket/src/racket/mzconfig.h.in +++ b/racket/src/racket/mzconfig.h.in @@ -4,9 +4,6 @@ #ifndef __MZSCHEME_CONFIGURATION_INFO__ #define __MZSCHEME_CONFIGURATION_INFO__ -/* The size of a `char', as computed by sizeof. */ -#undef SIZEOF_CHAR - /* The size of a `int', as computed by sizeof. */ #undef SIZEOF_INT diff --git a/racket/src/worksp/mzconfig.h b/racket/src/worksp/mzconfig.h index 0fdb43004c..df38ab3fec 100644 --- a/racket/src/worksp/mzconfig.h +++ b/racket/src/worksp/mzconfig.h @@ -10,9 +10,6 @@ /* Undefined items are not used on Windows. */ -/* The size of a `char', as computed by sizeof. */ -#undef SIZEOF_CHAR - /* The size of a `int', as computed by sizeof. */ #undef SIZEOF_INT