From: Erwin Janssen Date: Mon, 9 Jan 2017 19:01:50 +0000 (+0100) Subject: Remove checks standard C funcs from features/sfio X-Git-Tag: 2.42.0~213^2~2^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0934f47904107b65adce887b5cab4f580dfa092b;p=graphviz Remove checks standard C funcs from features/sfio Some functions are part of the C standard, so the checks in features/sfio are not required and can be removed. --- diff --git a/lib/sfio/features/sfio b/lib/sfio/features/sfio index 60a08e3a7..3fbcaa7fd 100644 --- a/lib/sfio/features/sfio +++ b/lib/sfio/features/sfio @@ -248,17 +248,3 @@ vax asm note{ register layout ok for vax string operations }end execute{ #endif } }end - -lib strtod note{ native strtod exists }end - -################################################################ -## See if there is "locale" stuff for conditioning printf/scanf -################################################################ - -lib locale note{ Check for localeconv }end compile{ - #include - main() - { struct lconv* lv = localeconv(); - return 0; - } -}end diff --git a/lib/sfio/sfhdr.h b/lib/sfio/sfhdr.h index 49244a125..4140eab8b 100644 --- a/lib/sfio/sfhdr.h +++ b/lib/sfio/sfhdr.h @@ -302,7 +302,6 @@ extern "C" { #define ESPIPE 29 #endif /* function to get the decimal point for local environment */ -#if _lib_locale #ifdef MAXFLOAT /* we don't need these, so we zap them to avoid compiler warnings */ #undef MAXFLOAT #endif @@ -328,9 +327,6 @@ extern "C" { } \ } \ } -#else -#define SFSETLOCALE(decimal,thousand) -#endif /* stream pool structure. */ typedef struct _sfpool_s Sfpool_t; struct _sfpool_s { @@ -779,10 +775,6 @@ extern "C" { extern char **_sfgetpath(char *); extern Sfdouble_t _sfstrtod(const char *, char **); -#if !_lib_strtod -#define strtod _sfstrtod -#endif - #ifndef errno extern int errno; #endif diff --git a/lib/sfio/sfstrtod.c b/lib/sfio/sfstrtod.c index b4d2cb966..115210aec 100644 --- a/lib/sfio/sfstrtod.c +++ b/lib/sfio/sfstrtod.c @@ -67,12 +67,8 @@ Sfdouble_t _sfstrtod(reg const char *s, char **retp) reg int n, c, m; reg int mode, fexp, sign, expsign; Sfdouble_t dval; -#if _lib_locale char decpoint = 0, thousand; SFSETLOCALE(decpoint, thousand); -#else -#define decpoint '.' -#endif /* skip initial blanks */ while (isspace(*s))