Overview
SHA1 Hash: | 0c78ba2eb48c14b821e5671908ec910d4b3a3dd7 |
---|---|
Date: | 2008-04-25 21:45:41 |
User: | stephan |
Comment: | s/strnlen/strnlen_/g for the local strnlen impementation because the name fataly collides with a func from standard headers in some gcc versions (e.g. GnuSolaris/Nexenta w/ gcc 4.0.x). |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified src/printf.c from [cefba92273] to [e955d82165].
@@ -153,11 +153,11 @@ ** Find the length of a string as long as that length does not ** exceed N bytes. If no zero terminator is seen in the first ** N bytes then return N. If N is negative, then this routine ** is an alias for strlen(). */ -static int strnlen(const char *z, int N){ +static int strnlen_(const char *z, int N){ int n = 0; while( (N-- != 0) && *(z++)!=0 ){ n++; } return n; } @@ -563,11 +563,11 @@ case etPATH: { int i; int limit = flag_alternateform ? va_arg(ap,int) : -1; char *e = va_arg(ap,char*); if( e==0 ){e="";} - length = strnlen(e, limit); + length = strnlen_(e, limit); zExtra = bufpt = malloc(length+1); for( i=0; i<length; i++ ){ if( e[i]=='\\' ){ bufpt[i]='/'; }else{ @@ -584,11 +584,11 @@ if( bufpt==0 ){ bufpt = ""; }else if( xtype==etDYNSTRING ){ zExtra = bufpt; } - length = strnlen(bufpt, limit); + length = strnlen_(bufpt, limit); if( precision>=0 && precision<length ) length = precision; break; } case etBLOB: { int limit = flag_alternateform ? va_arg(ap, int) : -1;