diff --git src/gethelp.c src/gethelp.c
index 3d70340..dd2abf7 100644
|
|
gethelp(char *helptxt, char *topic, char *bkarg, char *prefix, FILE *outf) |
126 | 126 | *p = 0; |
127 | 127 | fputs(t, outf); |
128 | 128 | t = &p[7]; |
129 | | if (macosx()) { |
| 129 | if (is_macosx()) { |
130 | 130 | /* all the same size for roff |
131 | 131 | * #BKMOD# |
132 | 132 | */ |
diff --git src/libc/unix.h src/libc/unix.h
index bfbd1f2..6ffd7cc 100644
|
|
|
74 | 74 | |
75 | 75 | |
76 | 76 | #ifdef __APPLE__ |
77 | | #define macosx() 1 |
| 77 | #define is_macosx() 1 |
78 | 78 | #else |
79 | | #define macosx() 0 |
| 79 | #define is_macosx() 0 |
80 | 80 | #endif |
81 | 81 | |
82 | 82 | /* tcp/tcp.c */ |
diff --git src/libc/win32.h src/libc/win32.h
index b2522a8..7bec191 100644
|
|
|
75 | 75 | #define mkpipe(p, size) pipe(p, size) |
76 | 76 | |
77 | 77 | #define win32() 1 |
78 | | #define macosx() 0 |
| 78 | #define is_macosx() 0 |
79 | 79 | #define NOPROC |
80 | 80 | #define ELOOP 40 |
81 | 81 | |
diff --git src/port/gui.c src/port/gui.c
index f1a7bcf..391c3a1 100644
|
|
gui_useDisplay(void) |
26 | 26 | char *p; |
27 | 27 | |
28 | 28 | if ((p = getenv("BK_NO_GUI_PROMPT")) && *p) return (0); |
29 | | if (win32() || macosx()) return ((p = getenv("BK_GUI")) && *p); |
| 29 | if (win32() || is_macosx()) return ((p = getenv("BK_GUI")) && *p); |
30 | 30 | return (getenv("DISPLAY") && (p = getenv("BK_GUI")) && *p); |
31 | 31 | } |
32 | 32 | |
diff --git src/port/uninstall.c src/port/uninstall.c
index 6a26c2b..50592af 100644
|
|
uninstall(char *path, int upgrade) |
351 | 351 | |
352 | 352 | dfd = efopen("BK_UNINSTALL_LOG"); |
353 | 353 | |
354 | | if (macosx() && exists(MAC_PHFILE)) { |
| 354 | if (is_macosx() && exists(MAC_PHFILE)) { |
355 | 355 | ph = backtick("cat " MAC_PHFILE, 0); |
356 | 356 | /* |
357 | 357 | * Ensure that |
… |
… |
uninstall(char *path, int upgrade) |
435 | 435 | free(cmd); |
436 | 436 | } |
437 | 437 | |
438 | | if (macosx()) { |
| 438 | if (is_macosx()) { |
439 | 439 | /* figure out if we're in a bundle or not */ |
440 | 440 | char *bundle = fullname(bin, 0); |
441 | 441 | |
… |
… |
uninstall(char *path, int upgrade) |
496 | 496 | } |
497 | 497 | } |
498 | 498 | /* On OS X, bk 7.0.1 and later use path_helper(8). Remove that crumb. */ |
499 | | if (macosx() && removeph) { |
| 499 | if (is_macosx() && removeph) { |
500 | 500 | unlink(MAC_PHFILE); |
501 | 501 | } |
502 | 502 | rc = 0; |
diff --git src/upgrade.c src/upgrade.c
index 37d05e3..b8afb70 100644
|
|
upgrade_main(int ac, char **av) |
131 | 131 | } else { |
132 | 132 | platform = bk_platform; |
133 | 133 | } |
134 | | if (macosx()) { |
| 134 | if (is_macosx()) { |
135 | 135 | /* figure out if we're in a bundle or not */ |
136 | 136 | bundle = fullname(bin, 0); |
137 | 137 | if (p = strstr(bundle, "BitKeeper.app")) { |
… |
… |
upgrade_main(int ac, char **av) |
148 | 148 | notice("upgrade-nomsys", 0, "-e"); |
149 | 149 | goto out; |
150 | 150 | } |
151 | | if (!macosx() && install && noperms(bin)) { |
| 151 | if (!is_macosx() && install && noperms(bin)) { |
152 | 152 | notice("upgrade-badperms", bin, "-e"); |
153 | 153 | goto out; |
154 | 154 | } |
… |
… |
upgrade_main(int ac, char **av) |
216 | 216 | unless (version) version = strdup(data[3]); |
217 | 217 | if (streq(data[5], platform)) { |
218 | 218 | /* found this platform */ |
219 | | if (macosx()) { |
| 219 | if (is_macosx()) { |
220 | 220 | /* if we hit a .bin, skip it. we |
221 | 221 | * want the .pkg */ |
222 | 222 | p = strrchr(data[1], '.'); |
… |
… |
proceed: |
347 | 347 | goto out; |
348 | 348 | } |
349 | 349 | #else |
350 | | if (macosx()) { |
| 350 | if (is_macosx()) { |
351 | 351 | sprintf(buf, "/usr/bin/open -W %s", data[1]); |
352 | 352 | } else { |
353 | 353 | sprintf(buf, "./%s -u", data[1]); |