summaryrefslogtreecommitdiff
path: root/ext/mysql/libmysql/my_error.c
diff options
context:
space:
mode:
authorMySQL Team <mysql@php.net>2001-06-01 20:07:26 +0000
committerMySQL Team <mysql@php.net>2001-06-01 20:07:26 +0000
commite8cbbc0637cb27c6fda64940a9138e08060475f8 (patch)
treef6353232aba5ae05c8f4779865cd742dc392b181 /ext/mysql/libmysql/my_error.c
parent304ac03be434eecf6edc1f025c455e9089f8af37 (diff)
downloadphp-git-e8cbbc0637cb27c6fda64940a9138e08060475f8.tar.gz
Upgrade ext/mysql/libmysql to version 3.23.39. No major changes -
portability fixes. Also add configure test for HAVE_INT_8_16_32 which should solve compilation problems on AIX.
Diffstat (limited to 'ext/mysql/libmysql/my_error.c')
-rw-r--r--ext/mysql/libmysql/my_error.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/mysql/libmysql/my_error.c b/ext/mysql/libmysql/my_error.c
index 78c2bb2a74..21dc3ec268 100644
--- a/ext/mysql/libmysql/my_error.c
+++ b/ext/mysql/libmysql/my_error.c
@@ -9,7 +9,7 @@ This file is public domain and comes with NO WARRANTY of any kind */
/* Define some external variables for error handling */
-const char ** NEAR errmsg[MAXMAPS]={0,0,0,0};
+const char ** NEAR my_errmsg[MAXMAPS]={0,0,0,0};
char NEAR errbuff[NRERRBUFFS][ERRMSGSIZE];
/* Error message to user */
@@ -28,10 +28,10 @@ int my_error(int nr,myf MyFlags, ...)
va_start(ap,MyFlags);
DBUG_PRINT("my", ("nr: %d MyFlags: %d errno: %d", nr, MyFlags, errno));
- if (nr / ERRMOD == GLOB && errmsg[GLOB] == 0)
+ if (nr / ERRMOD == GLOB && my_errmsg[GLOB] == 0)
init_glob_errs();
- olen=(uint) strlen(tpos=errmsg[nr / ERRMOD][nr % ERRMOD]);
+ olen=(uint) strlen(tpos=my_errmsg[nr / ERRMOD][nr % ERRMOD]);
endpos=ebuff;
while (*tpos)
@@ -51,6 +51,8 @@ int my_error(int nr,myf MyFlags, ...)
/* Skipp if max size is used (to be compatible with printf) */
while (isdigit(*tpos) || *tpos == '.' || *tpos == '-')
tpos++;
+ if (*tpos == 'l') /* Skipp 'l' argument */
+ tpos++;
if (*tpos == 's') /* String parameter */
{
par = va_arg(ap, char *);