@@ -195,7 +195,7 @@ void virtual_cwd_main_cwd_init(uint8_t reinit) /* {{{ */
195195 main_cwd_state .cwd_length = strlen (cwd );
196196#ifdef ZEND_WIN32
197197 if (main_cwd_state .cwd_length >= 2 && cwd [1 ] == ':' ) {
198- cwd [0 ] = toupper (cwd [0 ]);
198+ cwd [0 ] = toupper (( unsigned char ) cwd [0 ]);
199199 }
200200#endif
201201 main_cwd_state .cwd = strdup (cwd );
@@ -273,7 +273,7 @@ CWD_API char *virtual_getcwd_ex(size_t *length) /* {{{ */
273273 * length = state -> cwd_length + 1 ;
274274 retval = (char * ) emalloc (* length + 1 );
275275 memcpy (retval , state -> cwd , * length );
276- retval [0 ] = toupper (retval [0 ]);
276+ retval [0 ] = toupper (( unsigned char ) retval [0 ]);
277277 retval [* length - 1 ] = DEFAULT_SLASH ;
278278 retval [* length ] = '\0' ;
279279 return retval ;
@@ -1115,21 +1115,21 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
11151115 if (resolved_path [start ] == 0 ) {
11161116 goto verify ;
11171117 }
1118- resolved_path [start ] = toupper (resolved_path [start ]);
1118+ resolved_path [start ] = toupper (( unsigned char ) resolved_path [start ]);
11191119 start ++ ;
11201120 }
11211121 resolved_path [start ++ ] = DEFAULT_SLASH ;
11221122 while (!IS_SLASH (resolved_path [start ])) {
11231123 if (resolved_path [start ] == 0 ) {
11241124 goto verify ;
11251125 }
1126- resolved_path [start ] = toupper (resolved_path [start ]);
1126+ resolved_path [start ] = toupper (( unsigned char ) resolved_path [start ]);
11271127 start ++ ;
11281128 }
11291129 resolved_path [start ++ ] = DEFAULT_SLASH ;
11301130 } else if (IS_ABSOLUTE_PATH (resolved_path , path_length )) {
11311131 /* skip DRIVE name */
1132- resolved_path [0 ] = toupper (resolved_path [0 ]);
1132+ resolved_path [0 ] = toupper (( unsigned char ) resolved_path [0 ]);
11331133 resolved_path [2 ] = DEFAULT_SLASH ;
11341134 if (path_length == 2 ) {
11351135 resolved_path [3 ] = '\0' ;
0 commit comments