diff --git a/.gitattributes b/.gitattributes index 10f716d12b1b55e49ee140723bc8db4f32efd792..c11ae72dbba94252f5714b2c24148d6112ef0026 100644 --- a/.gitattributes +++ b/.gitattributes @@ -777,7 +777,6 @@ testfont binary /src/post_modules/_Image_SVG/configure.in foreign_ident /src/post_modules/_Image_SVG/svg.c foreign_ident /src/post_modules/configure.in foreign_ident -/src/preprocessor.h foreign_ident /src/program_areas.h foreign_ident /src/program_id.h foreign_ident /src/queue.c foreign_ident diff --git a/src/preprocessor.h b/src/preprocessor.h index e9da7d8fc3d9004aade15ecb5ad56d052dcc2c81..614bde89065ef84fc3b46587dda023f95466ce56 100644 --- a/src/preprocessor.h +++ b/src/preprocessor.h @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: preprocessor.h,v 1.97 2010/09/19 15:03:27 marcus Exp $ +|| $Id$ */ /* @@ -460,11 +460,14 @@ static ptrdiff_t calcC(struct cpp *this, WCHAR *data, ptrdiff_t len, case '0': if(data[pos+1]=='x' || data[pos+1]=='X') { - PCHARP p; - long val = STRTOL_PCHARP(MKPCHARP(data+pos+2, SHIFT), &p, 16); - if(OUTP()) - push_int(val); - pos = ((WCHAR *)p.ptr) - data; + void *p = data + pos + 2; + push_int(0); + + safe_wide_string_to_svalue_inumber(Pike_sp-1, p, &p, 16, 0, SHIFT); + + if(!OUTP()) pop_stack(); + + pos = ((WCHAR *)p) - data; break; } @@ -475,6 +478,8 @@ static ptrdiff_t calcC(struct cpp *this, WCHAR *data, ptrdiff_t len, PCHARP p; double f; long l; + + /* FIXME: Support bignums. */ p = MKPCHARP(data+pos, SHIFT); f = STRTOD_PCHARP(p, &p1);