File tree Expand file tree Collapse file tree 1 file changed +22
-6
lines changed
Expand file tree Collapse file tree 1 file changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -264,19 +264,35 @@ extern char *gitbasename(char *);
264264#endif
265265
266266#ifndef has_dos_drive_prefix
267- #define has_dos_drive_prefix (path ) 0
267+ static inline int git_has_dos_drive_prefix (const char * path )
268+ {
269+ return 0 ;
270+ }
271+ #define has_dos_drive_prefix git_has_dos_drive_prefix
268272#endif
269273
270- #ifndef offset_1st_component
271- #define offset_1st_component (path ) (is_dir_sep((path)[0]))
274+ #ifndef is_dir_sep
275+ static inline int git_is_dir_sep (int c )
276+ {
277+ return c == '/' ;
278+ }
279+ #define is_dir_sep git_is_dir_sep
272280#endif
273281
274- #ifndef is_dir_sep
275- #define is_dir_sep (c ) ((c) == '/')
282+ #ifndef offset_1st_component
283+ static inline int git_offset_1st_component (const char * path )
284+ {
285+ return is_dir_sep (path [0 ]);
286+ }
287+ #define offset_1st_component git_offset_1st_component
276288#endif
277289
278290#ifndef find_last_dir_sep
279- #define find_last_dir_sep (path ) strrchr(path, '/')
291+ static inline char * git_find_last_dir_sep (const char * path )
292+ {
293+ return strrchr (path , '/' );
294+ }
295+ #define find_last_dir_sep git_find_last_dir_sep
280296#endif
281297
282298#if defined(__HP_cc ) && (__HP_cc >= 61000 )
You can’t perform that action at this time.
0 commit comments