diff --git src/gethelp.c src/gethelp.c index 3d70340..dd2abf7 100644 --- src/gethelp.c +++ src/gethelp.c @@ -126,7 +126,7 @@ gethelp(char *helptxt, char *topic, char *bkarg, char *prefix, FILE *outf) *p = 0; fputs(t, outf); t = &p[7]; - if (macosx()) { + if (is_macosx()) { /* all the same size for roff * #BKMOD# */ diff --git src/libc/unix.h src/libc/unix.h index bfbd1f2..6ffd7cc 100644 --- src/libc/unix.h +++ src/libc/unix.h @@ -74,9 +74,9 @@ #ifdef __APPLE__ -#define macosx() 1 +#define is_macosx() 1 #else -#define macosx() 0 +#define is_macosx() 0 #endif /* tcp/tcp.c */ diff --git src/libc/win32.h src/libc/win32.h index b2522a8..7bec191 100644 --- src/libc/win32.h +++ src/libc/win32.h @@ -75,7 +75,7 @@ #define mkpipe(p, size) pipe(p, size) #define win32() 1 -#define macosx() 0 +#define is_macosx() 0 #define NOPROC #define ELOOP 40 diff --git src/port/gui.c src/port/gui.c index f1a7bcf..391c3a1 100644 --- src/port/gui.c +++ src/port/gui.c @@ -26,7 +26,7 @@ gui_useDisplay(void) char *p; if ((p = getenv("BK_NO_GUI_PROMPT")) && *p) return (0); - if (win32() || macosx()) return ((p = getenv("BK_GUI")) && *p); + if (win32() || is_macosx()) return ((p = getenv("BK_GUI")) && *p); return (getenv("DISPLAY") && (p = getenv("BK_GUI")) && *p); } diff --git src/port/uninstall.c src/port/uninstall.c index 6a26c2b..50592af 100644 --- src/port/uninstall.c +++ src/port/uninstall.c @@ -351,7 +351,7 @@ uninstall(char *path, int upgrade) dfd = efopen("BK_UNINSTALL_LOG"); - if (macosx() && exists(MAC_PHFILE)) { + if (is_macosx() && exists(MAC_PHFILE)) { ph = backtick("cat " MAC_PHFILE, 0); /* * Ensure that @@ -435,7 +435,7 @@ uninstall(char *path, int upgrade) free(cmd); } - if (macosx()) { + if (is_macosx()) { /* figure out if we're in a bundle or not */ char *bundle = fullname(bin, 0); @@ -496,7 +496,7 @@ uninstall(char *path, int upgrade) } } /* On OS X, bk 7.0.1 and later use path_helper(8). Remove that crumb. */ - if (macosx() && removeph) { + if (is_macosx() && removeph) { unlink(MAC_PHFILE); } rc = 0; diff --git src/upgrade.c src/upgrade.c index 37d05e3..b8afb70 100644 --- src/upgrade.c +++ src/upgrade.c @@ -131,7 +131,7 @@ upgrade_main(int ac, char **av) } else { platform = bk_platform; } - if (macosx()) { + if (is_macosx()) { /* figure out if we're in a bundle or not */ bundle = fullname(bin, 0); if (p = strstr(bundle, "BitKeeper.app")) { @@ -148,7 +148,7 @@ upgrade_main(int ac, char **av) notice("upgrade-nomsys", 0, "-e"); goto out; } - if (!macosx() && install && noperms(bin)) { + if (!is_macosx() && install && noperms(bin)) { notice("upgrade-badperms", bin, "-e"); goto out; } @@ -216,7 +216,7 @@ upgrade_main(int ac, char **av) unless (version) version = strdup(data[3]); if (streq(data[5], platform)) { /* found this platform */ - if (macosx()) { + if (is_macosx()) { /* if we hit a .bin, skip it. we * want the .pkg */ p = strrchr(data[1], '.'); @@ -347,7 +347,7 @@ proceed: goto out; } #else - if (macosx()) { + if (is_macosx()) { sprintf(buf, "/usr/bin/open -W %s", data[1]); } else { sprintf(buf, "./%s -u", data[1]);