Fixed mingw32 build
authorSam Lantinga <slouken@libsdl.org>
Sat, 06 Jul 2013 00:15:01 -0700
changeset 735380e081e7538d
parent 7352 de96caa46c09
child 7354 ccc59c3bd1ba
Fixed mingw32 build
src/stdlib/SDL_string.c
     1.1 --- a/src/stdlib/SDL_string.c	Sat Jul 06 00:06:44 2013 -0700
     1.2 +++ b/src/stdlib/SDL_string.c	Sat Jul 06 00:15:01 2013 -0700
     1.3 @@ -526,7 +526,7 @@
     1.4  SDL_strrev(char *string)
     1.5  {
     1.6  #if defined(HAVE__STRREV)
     1.7 -    return _strrev(str);
     1.8 +    return _strrev(string);
     1.9  #else
    1.10      size_t len = SDL_strlen(string);
    1.11      char *a = &string[0];
    1.12 @@ -545,7 +545,7 @@
    1.13  SDL_strupr(char *string)
    1.14  {
    1.15  #if defined(HAVE__STRUPR)
    1.16 -    return _strupr(str);
    1.17 +    return _strupr(string);
    1.18  #else
    1.19      char *bufp = string;
    1.20      while (*bufp) {
    1.21 @@ -560,7 +560,7 @@
    1.22  SDL_strlwr(char *string)
    1.23  {
    1.24  #if defined(HAVE__STRLWR)
    1.25 -    return _strlwr(str);
    1.26 +    return _strlwr(string);
    1.27  #else
    1.28      char *bufp = string;
    1.29      while (*bufp) {
    1.30 @@ -625,8 +625,8 @@
    1.31  #endif /* HAVE_STRSTR */
    1.32  }
    1.33  
    1.34 -#if !defined(HAVE__LTOA) || !defined(SDL_lltoa) || \
    1.35 -    !defined(SDL_ultoa) || !defined(SDL_ulltoa)
    1.36 +#if !defined(HAVE__LTOA) || !defined(HAVE__I64TOA) || \
    1.37 +    !defined(HAVE__ULTOA) || !defined(HAVE__UI64TOA)
    1.38  static const char ntoa_table[] = {
    1.39      '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
    1.40      'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
    1.41 @@ -636,22 +636,22 @@
    1.42  #endif /* ntoa() conversion table */
    1.43  
    1.44  char *
    1.45 -SDL_itoa(int value, char *str, int radix)
    1.46 +SDL_itoa(int value, char *string, int radix)
    1.47  {
    1.48  #ifdef HAVE_ITOA
    1.49 -    return itoa(value, str, radix);
    1.50 +    return itoa(value, string, radix);
    1.51  #else
    1.52 -    return SDL_ltoa((long)value, str, radix);
    1.53 +    return SDL_ltoa((long)value, string, radix);
    1.54  #endif /* HAVE_ITOA */
    1.55  }
    1.56  
    1.57  char *
    1.58 -SDL_uitoa(unsigned int value, char *str, int radix)
    1.59 +SDL_uitoa(unsigned int value, char *string, int radix)
    1.60  {
    1.61  #ifdef HAVE__UITOA
    1.62 -    return _uitoa(value, str, radix);
    1.63 +    return _uitoa(value, string, radix);
    1.64  #else
    1.65 -    return SDL_ultoa((unsigned long)value, str, radix);
    1.66 +    return SDL_ultoa((unsigned long)value, string, radix);
    1.67  #endif /* HAVE__UITOA */
    1.68  }
    1.69  
    1.70 @@ -659,7 +659,7 @@
    1.71  SDL_ltoa(long value, char *string, int radix)
    1.72  {
    1.73  #if defined(HAVE__LTOA)
    1.74 -    return _ltoa(value, str, radix);
    1.75 +    return _ltoa(value, string, radix);
    1.76  #else
    1.77      char *bufp = string;
    1.78  
    1.79 @@ -692,7 +692,7 @@
    1.80  SDL_ultoa(unsigned long value, char *string, int radix)
    1.81  {
    1.82  #if defined(HAVE__ULTOA)
    1.83 -    return _ultoa(value, str, radix);
    1.84 +    return _ultoa(value, string, radix);
    1.85  #else
    1.86      char *bufp = string;
    1.87  
    1.88 @@ -717,7 +717,7 @@
    1.89  SDL_lltoa(Sint64 value, char *string, int radix)
    1.90  {
    1.91  #if defined(HAVE__I64TOA)
    1.92 -    return _i64toa(value, str, radix);
    1.93 +    return _i64toa(value, string, radix);
    1.94  #else
    1.95      char *bufp = string;
    1.96  
    1.97 @@ -750,7 +750,7 @@
    1.98  SDL_ulltoa(Uint64 value, char *string, int radix)
    1.99  {
   1.100  #if defined(HAVE__UI64TOA)
   1.101 -    return _ui64toa(value, str, radix);
   1.102 +    return _ui64toa(value, string, radix);
   1.103  #else
   1.104      char *bufp = string;
   1.105  
   1.106 @@ -771,21 +771,21 @@
   1.107  #endif /* HAVE__UI64TOA */
   1.108  }
   1.109  
   1.110 -int SDL_atoi(const char *str)
   1.111 +int SDL_atoi(const char *string)
   1.112  {
   1.113  #ifdef HAVE_ATOI
   1.114 -    return atoi(str);
   1.115 +    return atoi(string);
   1.116  #else
   1.117 -    return SDL_strtol(str, NULL, 0);
   1.118 +    return SDL_strtol(string, NULL, 0);
   1.119  #endif /* HAVE_ATOI */
   1.120  }
   1.121  
   1.122 -double SDL_atof(const char *str)
   1.123 +double SDL_atof(const char *string)
   1.124  {
   1.125  #ifdef HAVE_ATOF
   1.126 -    return (double) atof(str);
   1.127 +    return (double) atof(string);
   1.128  #else
   1.129 -    return SDL_strtod(str, NULL);
   1.130 +    return SDL_strtod(string, NULL);
   1.131  #endif /* HAVE_ATOF */
   1.132  }
   1.133