File tree Expand file tree Collapse file tree 1 file changed +31
-27
lines changed Expand file tree Collapse file tree 1 file changed +31
-27
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,37 @@ if {[catch {package require Tcl 8.5} err]
4444
4545catch {rename send {}} ; # What an evil concept...
4646
47+ # #####################################################################
48+ # #
49+ # # Enabling platform-specific code paths
50+
51+ proc is_MacOSX {} {
52+ if {[tk windowingsystem] eq {aqua}} {
53+ return 1
54+ }
55+ return 0
56+ }
57+
58+ proc is_Windows {} {
59+ if {$::tcl_platform(platform) eq {windows}} {
60+ return 1
61+ }
62+ return 0
63+ }
64+
65+ set _iscygwin {}
66+ proc is_Cygwin {} {
67+ global _iscygwin
68+ if {$_iscygwin eq {}} {
69+ if {[string match " CYGWIN_*" $::tcl_platform(os) ]} {
70+ set _iscygwin 1
71+ } else {
72+ set _iscygwin 0
73+ }
74+ }
75+ return $_iscygwin
76+ }
77+
4778# #####################################################################
4879# #
4980# # locate our library
@@ -163,7 +194,6 @@ set _isbare {}
163194set _gitexec {}
164195set _githtmldir {}
165196set _reponame {}
166- set _iscygwin {}
167197set _search_path {}
168198set _shellpath {@@SHELL_PATH@@}
169199
@@ -252,32 +282,6 @@ proc reponame {} {
252282 return $::_reponame
253283}
254284
255- proc is_MacOSX {} {
256- if {[tk windowingsystem] eq {aqua}} {
257- return 1
258- }
259- return 0
260- }
261-
262- proc is_Windows {} {
263- if {$::tcl_platform(platform) eq {windows}} {
264- return 1
265- }
266- return 0
267- }
268-
269- proc is_Cygwin {} {
270- global _iscygwin
271- if {$_iscygwin eq {}} {
272- if {[string match " CYGWIN_*" $::tcl_platform(os) ]} {
273- set _iscygwin 1
274- } else {
275- set _iscygwin 0
276- }
277- }
278- return $_iscygwin
279- }
280-
281285proc is_enabled {option} {
282286 global enabled_options
283287 if {[catch {set on $enabled_options($option) }]} {return 0}
You can’t perform that action at this time.
0 commit comments