@@ -235,7 +235,7 @@ static SQLLEN pg_bin2whex(const char *src, SQLWCHAR *dst, SQLLEN length);
235
235
#elif defined(HAVE_STRTOUL )
236
236
#define ATOI32U (val ) strtoul(val, NULL, 10)
237
237
#else /* HAVE_STRTOUL */
238
- #define ATOI32U atol
238
+ #define ATOI32U ( val ) strtol(val, NULL, 10)
239
239
#endif /* WIN32 */
240
240
241
241
/*
@@ -334,23 +334,23 @@ timestamp2stime(const char *str, SIMPLE_TIME *st, BOOL *bZone, int *zone)
334
334
{
335
335
case '+' :
336
336
* bZone = TRUE;
337
- * zone = atoi (& rest [1 ]);
337
+ * zone = pg_atoi (& rest [1 ]);
338
338
break ;
339
339
case '-' :
340
340
* bZone = TRUE;
341
- * zone = - atoi (& rest [1 ]);
341
+ * zone = - pg_atoi (& rest [1 ]);
342
342
break ;
343
343
case '.' :
344
344
if ((ptr = strchr (rest , '+' )) != NULL )
345
345
{
346
346
* bZone = TRUE;
347
- * zone = atoi (& ptr [1 ]);
347
+ * zone = pg_atoi (& ptr [1 ]);
348
348
* ptr = '\0' ;
349
349
}
350
350
else if ((ptr = strchr (rest , '-' )) != NULL )
351
351
{
352
352
* bZone = TRUE;
353
- * zone = - atoi (& ptr [1 ]);
353
+ * zone = - pg_atoi (& ptr [1 ]);
354
354
* ptr = '\0' ;
355
355
}
356
356
for (i = 1 ; i < 10 ; i ++ )
@@ -361,7 +361,7 @@ timestamp2stime(const char *str, SIMPLE_TIME *st, BOOL *bZone, int *zone)
361
361
for (; i < 10 ; i ++ )
362
362
rest [i ] = '0' ;
363
363
rest [i ] = '\0' ;
364
- st -> fr = atoi (& rest [1 ]);
364
+ st -> fr = pg_atoi (& rest [1 ]);
365
365
break ;
366
366
case 'B' :
367
367
if (stricmp (rest , "BC" ) == 0 )
@@ -563,7 +563,7 @@ static int getPrecisionPart(int precision, const char * precPart)
563
563
memcpy (fraction , precPart , cpys );
564
564
fraction [precision ] = '\0' ;
565
565
566
- return atoi (fraction );
566
+ return pg_atoi (fraction );
567
567
}
568
568
569
569
static BOOL
@@ -849,7 +849,7 @@ static double get_double_value(const char *str)
849
849
#else
850
850
return (double ) - (HUGE_VAL * HUGE_VAL );
851
851
#endif /* INFINITY */
852
- return atof (str );
852
+ return pg_atof (str );
853
853
}
854
854
855
855
static int char2guid (const char * str , SQLGUID * g )
@@ -1802,29 +1802,29 @@ MYLOG(DETAIL_LOG_LEVEL, "2stime fr=%d\n", std_time.fr);
1802
1802
case SQL_C_BIT :
1803
1803
len = 1 ;
1804
1804
if (bind_size > 0 )
1805
- * ((UCHAR * ) rgbValueBindRow ) = atoi (neut_str );
1805
+ * ((UCHAR * ) rgbValueBindRow ) = pg_atoi (neut_str );
1806
1806
else
1807
- * ((UCHAR * ) rgbValue + bind_row ) = atoi (neut_str );
1807
+ * ((UCHAR * ) rgbValue + bind_row ) = pg_atoi (neut_str );
1808
1808
1809
1809
MYLOG (99 , "SQL_C_BIT: bind_row = " FORMAT_POSIROW " val = %d, cb = " FORMAT_LEN ", rgb=%d\n" ,
1810
- bind_row , atoi (neut_str ), cbValueMax , * ((UCHAR * )rgbValue ));
1810
+ bind_row , pg_atoi (neut_str ), cbValueMax , * ((UCHAR * )rgbValue ));
1811
1811
break ;
1812
1812
1813
1813
case SQL_C_STINYINT :
1814
1814
case SQL_C_TINYINT :
1815
1815
len = 1 ;
1816
1816
if (bind_size > 0 )
1817
- * ((SCHAR * ) rgbValueBindRow ) = atoi (neut_str );
1817
+ * ((SCHAR * ) rgbValueBindRow ) = pg_atoi (neut_str );
1818
1818
else
1819
- * ((SCHAR * ) rgbValue + bind_row ) = atoi (neut_str );
1819
+ * ((SCHAR * ) rgbValue + bind_row ) = pg_atoi (neut_str );
1820
1820
break ;
1821
1821
1822
1822
case SQL_C_UTINYINT :
1823
1823
len = 1 ;
1824
1824
if (bind_size > 0 )
1825
- * ((UCHAR * ) rgbValueBindRow ) = atoi (neut_str );
1825
+ * ((UCHAR * ) rgbValueBindRow ) = pg_atoi (neut_str );
1826
1826
else
1827
- * ((UCHAR * ) rgbValue + bind_row ) = atoi (neut_str );
1827
+ * ((UCHAR * ) rgbValue + bind_row ) = pg_atoi (neut_str );
1828
1828
break ;
1829
1829
1830
1830
case SQL_C_FLOAT :
@@ -1865,26 +1865,26 @@ MYLOG(DETAIL_LOG_LEVEL, "2stime fr=%d\n", std_time.fr);
1865
1865
case SQL_C_SHORT :
1866
1866
len = 2 ;
1867
1867
if (bind_size > 0 )
1868
- * ((SQLSMALLINT * ) rgbValueBindRow ) = atoi (neut_str );
1868
+ * ((SQLSMALLINT * ) rgbValueBindRow ) = pg_atoi (neut_str );
1869
1869
else
1870
- * ((SQLSMALLINT * ) rgbValue + bind_row ) = atoi (neut_str );
1870
+ * ((SQLSMALLINT * ) rgbValue + bind_row ) = pg_atoi (neut_str );
1871
1871
break ;
1872
1872
1873
1873
case SQL_C_USHORT :
1874
1874
len = 2 ;
1875
1875
if (bind_size > 0 )
1876
- * ((SQLUSMALLINT * ) rgbValueBindRow ) = atoi (neut_str );
1876
+ * ((SQLUSMALLINT * ) rgbValueBindRow ) = pg_atoi (neut_str );
1877
1877
else
1878
- * ((SQLUSMALLINT * ) rgbValue + bind_row ) = atoi (neut_str );
1878
+ * ((SQLUSMALLINT * ) rgbValue + bind_row ) = pg_atoi (neut_str );
1879
1879
break ;
1880
1880
1881
1881
case SQL_C_SLONG :
1882
1882
case SQL_C_LONG :
1883
1883
len = 4 ;
1884
1884
if (bind_size > 0 )
1885
- * ((SQLINTEGER * ) rgbValueBindRow ) = atol (neut_str );
1885
+ * ((SQLINTEGER * ) rgbValueBindRow ) = pg_atol (neut_str );
1886
1886
else
1887
- * ((SQLINTEGER * ) rgbValue + bind_row ) = atol (neut_str );
1887
+ * ((SQLINTEGER * ) rgbValue + bind_row ) = pg_atol (neut_str );
1888
1888
break ;
1889
1889
1890
1890
case SQL_C_ULONG :
0 commit comments