Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita667288

Browse files
committed
Fix compiler-detected problem for Alphas: it seems strlen returns
something wider than int on that platform. Also, remove bogusassumption that sizeof("INT_MAX") has something to do with the maximumnumber of digits in an int.
1 parent8753157 commita667288

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/interfaces/ecpg/preproc/preproc.y

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.250 2003/08/01 11:25:55 meskes Exp $*/
1+
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.251 2003/08/06 15:54:06 tgl Exp $*/
22

33
/* Copyright comment*/
44
%{
@@ -5290,9 +5290,9 @@ UsingConst: AllConst
52905290
{
52915291
if ($1[1] !='?')/* found a constant*/
52925292
{
5293-
char *length = mm_alloc(sizeof("INT_MAX")+1);
5293+
char *length = mm_alloc(32);
52945294

5295-
sprintf(length,"%d", strlen($1));
5295+
sprintf(length,"%d",(int)strlen($1));
52965296
add_variable(&argsinsert, new_variable($1, ECPGmake_simple_type(ECPGt_const, length), 0), &no_indicator);
52975297
}
52985298
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp