@@ -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 );
@@ -271,7 +271,7 @@ CWD_API char *virtual_getcwd_ex(size_t *length) /* {{{ */
271271 * length = state -> cwd_length + 1 ;
272272 retval = (char * ) emalloc (* length + 1 );
273273 memcpy (retval , state -> cwd , * length );
274- retval [0 ] = toupper (retval [0 ]);
274+ retval [0 ] = toupper (( unsigned char ) retval [0 ]);
275275 retval [* length - 1 ] = DEFAULT_SLASH ;
276276 retval [* length ] = '\0' ;
277277 return retval ;
@@ -1113,21 +1113,21 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
11131113 if (resolved_path [start ] == 0 ) {
11141114 goto verify ;
11151115 }
1116- resolved_path [start ] = toupper (resolved_path [start ]);
1116+ resolved_path [start ] = toupper (( unsigned char ) resolved_path [start ]);
11171117 start ++ ;
11181118 }
11191119 resolved_path [start ++ ] = DEFAULT_SLASH ;
11201120 while (!IS_SLASH (resolved_path [start ])) {
11211121 if (resolved_path [start ] == 0 ) {
11221122 goto verify ;
11231123 }
1124- resolved_path [start ] = toupper (resolved_path [start ]);
1124+ resolved_path [start ] = toupper (( unsigned char ) resolved_path [start ]);
11251125 start ++ ;
11261126 }
11271127 resolved_path [start ++ ] = DEFAULT_SLASH ;
11281128 } else if (IS_ABSOLUTE_PATH (resolved_path , path_length )) {
11291129 /* skip DRIVE name */
1130- resolved_path [0 ] = toupper (resolved_path [0 ]);
1130+ resolved_path [0 ] = toupper (( unsigned char ) resolved_path [0 ]);
11311131 resolved_path [2 ] = DEFAULT_SLASH ;
11321132 if (path_length == 2 ) {
11331133 resolved_path [3 ] = '\0' ;
0 commit comments