@@ -193,7 +193,7 @@ void virtual_cwd_main_cwd_init(uint8_t reinit) /* {{{ */
193193 main_cwd_state .cwd_length = strlen (cwd );
194194#ifdef ZEND_WIN32
195195 if (main_cwd_state .cwd_length >= 2 && cwd [1 ] == ':' ) {
196- cwd [0 ] = toupper (cwd [0 ]);
196+ cwd [0 ] = toupper (( unsigned char ) cwd [0 ]);
197197 }
198198#endif
199199 main_cwd_state .cwd = strdup (cwd );
@@ -269,7 +269,7 @@ CWD_API char *virtual_getcwd_ex(size_t *length) /* {{{ */
269269 * length = state -> cwd_length + 1 ;
270270 retval = (char * ) emalloc (* length + 1 );
271271 memcpy (retval , state -> cwd , * length );
272- retval [0 ] = toupper (retval [0 ]);
272+ retval [0 ] = toupper (( unsigned char ) retval [0 ]);
273273 retval [* length - 1 ] = DEFAULT_SLASH ;
274274 retval [* length ] = '\0' ;
275275 return retval ;
@@ -1112,21 +1112,21 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
11121112 if (resolved_path [start ] == 0 ) {
11131113 goto verify ;
11141114 }
1115- resolved_path [start ] = toupper (resolved_path [start ]);
1115+ resolved_path [start ] = toupper (( unsigned char ) resolved_path [start ]);
11161116 start ++ ;
11171117 }
11181118 resolved_path [start ++ ] = DEFAULT_SLASH ;
11191119 while (!IS_SLASH (resolved_path [start ])) {
11201120 if (resolved_path [start ] == 0 ) {
11211121 goto verify ;
11221122 }
1123- resolved_path [start ] = toupper (resolved_path [start ]);
1123+ resolved_path [start ] = toupper (( unsigned char ) resolved_path [start ]);
11241124 start ++ ;
11251125 }
11261126 resolved_path [start ++ ] = DEFAULT_SLASH ;
11271127 } else if (IS_ABSOLUTE_PATH (resolved_path , path_length )) {
11281128 /* skip DRIVE name */
1129- resolved_path [0 ] = toupper (resolved_path [0 ]);
1129+ resolved_path [0 ] = toupper (( unsigned char ) resolved_path [0 ]);
11301130 resolved_path [2 ] = DEFAULT_SLASH ;
11311131 if (path_length == 2 ) {
11321132 resolved_path [3 ] = '\0' ;
0 commit comments