Explicitly add stdio.h and string.h to make strtod.c work standalone.

Found using Clang's static analyzer.
This commit is contained in:
Brett Cannon 2010-05-05 20:50:03 +00:00
parent c33e82d23c
commit 0b64be2389

View file

@ -1,3 +1,6 @@
#include <stdio.h>
#include <string.h>
#include "pyconfig.h" #include "pyconfig.h"
/* comp.sources.misc strtod(), as posted in comp.lang.tcl, /* comp.sources.misc strtod(), as posted in comp.lang.tcl,
@ -77,7 +80,7 @@ double strtod(char *str, char **ptr)
dp = buffer; dp = buffer;
*dp++ = '0'; *dp++ = '.'; *dp++ = '0'; *dp++ = '.';
buforg = dp, buflim = buffer+48; buforg = dp, buflim = buffer+48;
for (save = sp; c = *sp; sp++) for (save = sp; (c = *sp); sp++)
if (c == '.') { if (c == '.') {
if (dotseen) break; if (dotseen) break;
dotseen++; dotseen++;