diff options
Diffstat (limited to 'win32/mingw.c')
-rw-r--r-- | win32/mingw.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/win32/mingw.c b/win32/mingw.c index dfe38734a..c14ad1f1f 100644 --- a/win32/mingw.c +++ b/win32/mingw.c | |||
@@ -2255,7 +2255,7 @@ int enumerate_links(const char *file, char *name) | |||
2255 | 2255 | ||
2256 | /* Return the length of the root of a UNC path, i.e. the '//host/share' | 2256 | /* Return the length of the root of a UNC path, i.e. the '//host/share' |
2257 | * component, or 0 if the path doesn't look like that. */ | 2257 | * component, or 0 if the path doesn't look like that. */ |
2258 | int unc_root_len(const char *dir) | 2258 | int FAST_FUNC unc_root_len(const char *dir) |
2259 | { | 2259 | { |
2260 | const char *s = dir + 2; | 2260 | const char *s = dir + 2; |
2261 | int len; | 2261 | int len; |
@@ -2276,7 +2276,7 @@ int unc_root_len(const char *dir) | |||
2276 | 2276 | ||
2277 | /* Return the length of the root of a path, i.e. either the drive or | 2277 | /* Return the length of the root of a path, i.e. either the drive or |
2278 | * UNC '//host/share', or 0 if the path doesn't look like that. */ | 2278 | * UNC '//host/share', or 0 if the path doesn't look like that. */ |
2279 | int root_len(const char *path) | 2279 | int FAST_FUNC root_len(const char *path) |
2280 | { | 2280 | { |
2281 | if (path == NULL) | 2281 | if (path == NULL) |
2282 | return 0; | 2282 | return 0; |
@@ -2285,7 +2285,7 @@ int root_len(const char *path) | |||
2285 | return unc_root_len(path); | 2285 | return unc_root_len(path); |
2286 | } | 2286 | } |
2287 | 2287 | ||
2288 | const char *get_system_drive(void) | 2288 | const char * FAST_FUNC get_system_drive(void) |
2289 | { | 2289 | { |
2290 | static const char *drive = NULL; | 2290 | static const char *drive = NULL; |
2291 | char sysdir[PATH_MAX]; | 2291 | char sysdir[PATH_MAX]; |
@@ -2320,7 +2320,7 @@ int chdir_system_drive(void) | |||
2320 | * an allocated string containing the resolved path. Die on failure, | 2320 | * an allocated string containing the resolved path. Die on failure, |
2321 | * which is most likely because the file doesn't exist. | 2321 | * which is most likely because the file doesn't exist. |
2322 | */ | 2322 | */ |
2323 | char *xabsolute_path(char *path) | 2323 | char * FAST_FUNC xabsolute_path(char *path) |
2324 | { | 2324 | { |
2325 | char *rpath; | 2325 | char *rpath; |
2326 | 2326 | ||
@@ -2332,7 +2332,7 @@ char *xabsolute_path(char *path) | |||
2332 | bb_perror_msg_and_die("can't open '%s'", path); | 2332 | bb_perror_msg_and_die("can't open '%s'", path); |
2333 | } | 2333 | } |
2334 | 2334 | ||
2335 | char *get_drive_cwd(const char *path, char *buffer, int size) | 2335 | char * FAST_FUNC get_drive_cwd(const char *path, char *buffer, int size) |
2336 | { | 2336 | { |
2337 | char drive[3] = { *path, ':', '\0' }; | 2337 | char drive[3] = { *path, ':', '\0' }; |
2338 | DWORD ret; | 2338 | DWORD ret; |
@@ -2343,7 +2343,7 @@ char *get_drive_cwd(const char *path, char *buffer, int size) | |||
2343 | return bs_to_slash(buffer); | 2343 | return bs_to_slash(buffer); |
2344 | } | 2344 | } |
2345 | 2345 | ||
2346 | void fix_path_case(char *path) | 2346 | void FAST_FUNC fix_path_case(char *path) |
2347 | { | 2347 | { |
2348 | char resolved[PATH_MAX]; | 2348 | char resolved[PATH_MAX]; |
2349 | int len; | 2349 | int len; |
@@ -2365,7 +2365,7 @@ void fix_path_case(char *path) | |||
2365 | } | 2365 | } |
2366 | } | 2366 | } |
2367 | 2367 | ||
2368 | void make_sparse(int fd, off_t start, off_t end) | 2368 | void FAST_FUNC make_sparse(int fd, off_t start, off_t end) |
2369 | { | 2369 | { |
2370 | DWORD dwTemp; | 2370 | DWORD dwTemp; |
2371 | HANDLE fh; | 2371 | HANDLE fh; |
@@ -2410,7 +2410,7 @@ void *get_proc_addr(const char *dll, const char *function, | |||
2410 | return proc->pfunction; | 2410 | return proc->pfunction; |
2411 | } | 2411 | } |
2412 | 2412 | ||
2413 | int unix_path(const char *path) | 2413 | int FAST_FUNC unix_path(const char *path) |
2414 | { | 2414 | { |
2415 | int i; | 2415 | int i; |
2416 | char *p = xstrdup(path); | 2416 | char *p = xstrdup(path); |
@@ -2423,7 +2423,7 @@ int unix_path(const char *path) | |||
2423 | 2423 | ||
2424 | /* Return true if file is referenced using a path. This means a path | 2424 | /* Return true if file is referenced using a path. This means a path |
2425 | * look-up isn't required. */ | 2425 | * look-up isn't required. */ |
2426 | int has_path(const char *file) | 2426 | int FAST_FUNC has_path(const char *file) |
2427 | { | 2427 | { |
2428 | return strchr(file, '/') || strchr(file, '\\') || | 2428 | return strchr(file, '/') || strchr(file, '\\') || |
2429 | has_dos_drive_prefix(file); | 2429 | has_dos_drive_prefix(file); |
@@ -2438,7 +2438,7 @@ int has_path(const char *file) | |||
2438 | * Paths of the form /dir/file or c:dir/file aren't relative by this | 2438 | * Paths of the form /dir/file or c:dir/file aren't relative by this |
2439 | * definition. | 2439 | * definition. |
2440 | */ | 2440 | */ |
2441 | int is_relative_path(const char *path) | 2441 | int FAST_FUNC is_relative_path(const char *path) |
2442 | { | 2442 | { |
2443 | return !is_dir_sep(path[0]) && !has_dos_drive_prefix(path); | 2443 | return !is_dir_sep(path[0]) && !has_dos_drive_prefix(path); |
2444 | } | 2444 | } |
@@ -2451,7 +2451,7 @@ int is_relative_path(const char *path) | |||
2451 | * matches the file name from bb_busybox_exec_path (with appropriate | 2451 | * matches the file name from bb_busybox_exec_path (with appropriate |
2452 | * allowance for 'busybox*.exe'). | 2452 | * allowance for 'busybox*.exe'). |
2453 | */ | 2453 | */ |
2454 | const char *applet_to_exe(const char *name) | 2454 | const char * FAST_FUNC applet_to_exe(const char *name) |
2455 | { | 2455 | { |
2456 | const char *exefile = bb_basename(bb_busybox_exec_path); | 2456 | const char *exefile = bb_basename(bb_busybox_exec_path); |
2457 | const char *exesuff = is_prefixed_with_case(exefile, name); | 2457 | const char *exesuff = is_prefixed_with_case(exefile, name); |
@@ -2469,7 +2469,7 @@ const char *applet_to_exe(const char *name) | |||
2469 | * call should use a NULL pointer for str, subsequent calls should | 2469 | * call should use a NULL pointer for str, subsequent calls should |
2470 | * pass an allocated string which will be freed. | 2470 | * pass an allocated string which will be freed. |
2471 | */ | 2471 | */ |
2472 | char *xappendword(const char *str, const char *word) | 2472 | char * FAST_FUNC xappendword(const char *str, const char *word) |
2473 | { | 2473 | { |
2474 | char *newstr = str ? xasprintf("%s %s", str, word) : xstrdup(word); | 2474 | char *newstr = str ? xasprintf("%s %s", str, word) : xstrdup(word); |
2475 | free((void *)str); | 2475 | free((void *)str); |
@@ -2509,7 +2509,7 @@ change_critical_error_dialogs(const char *newval) | |||
2509 | 0 : SEM_FAILCRITICALERRORS); | 2509 | 0 : SEM_FAILCRITICALERRORS); |
2510 | } | 2510 | } |
2511 | 2511 | ||
2512 | char *exe_relative_path(const char *tail) | 2512 | char * FAST_FUNC exe_relative_path(const char *tail) |
2513 | { | 2513 | { |
2514 | char *exepath = xstrdup(bb_busybox_exec_path); | 2514 | char *exepath = xstrdup(bb_busybox_exec_path); |
2515 | char *relpath = concat_path_file(dirname(exepath), tail); | 2515 | char *relpath = concat_path_file(dirname(exepath), tail); |