diff options
author | jan.nijtmans <jan.nijtmans@noemail.net> | 2012-05-24 10:54:50 (GMT) |
---|---|---|
committer | jan.nijtmans <jan.nijtmans@noemail.net> | 2012-05-24 10:54:50 (GMT) |
commit | 6147ac1f8bf7eb773fc4693b8204218a0a279dd6 (patch) | |
tree | 6ac609393630b9f07c7b780d4904bdfd374d3b1c /tools | |
parent | 5f023ad70667546a4bc4a1d1b9b8256310ff6a8b (diff) | |
parent | fc9e9acb064ab5506fa4f5f6e9a8848e3563d115 (diff) | |
download | tcl-6147ac1f8bf7eb773fc4693b8204218a0a279dd6.zip tcl-6147ac1f8bf7eb773fc4693b8204218a0a279dd6.tar.gz tcl-6147ac1f8bf7eb773fc4693b8204218a0a279dd6.tar.bz2 |
Revert most of [3caedf05df], since when we let cygwin share the win32 stub table this is no longer necessary
implement TclpInetNtoa for win32
Let cygwin share stub table with win32
FossilOrigin-Name: 3873dc6035af522efd5b527aed115c4c37e1e638
Diffstat (limited to 'tools')
-rw-r--r-- | tools/genStubs.tcl | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl index e654bf4..bb584b2 100644 --- a/tools/genStubs.tcl +++ b/tools/genStubs.tcl @@ -279,19 +279,27 @@ proc genStubs::rewriteFile {file text} { # Results: # Returns the original text inside an appropriate #ifdef. -proc genStubs::addPlatformGuard {plat iftxt {eltxt {}}} { +proc genStubs::addPlatformGuard {plat iftxt {eltxt {}} {withCygwin 0}} { set text "" switch $plat { win { - append text "#ifdef __WIN32__ /* WIN */\n${iftxt}" + append text "#if defined(__WIN32__)" + if {$withCygwin} { + append text " || defined(__CYGWIN__)" + } + append text " /* WIN */\n${iftxt}" if {$eltxt ne ""} { append text "#else /* WIN */\n${eltxt}" } append text "#endif /* WIN */\n" } unix { - append text "#if !defined(__WIN32__) && !defined(MAC_OSX_TCL)\ - /* UNIX */\n${iftxt}" + append text "#if !defined(__WIN32__)" + if {$withCygwin} { + append text " && !defined(__CYGWIN__)" + } + append text " && !defined(MAC_TCL)\ + /* UNIX */\n${iftxt}" if {$eltxt ne ""} { append text "#else /* UNIX */\n${eltxt}" } @@ -312,8 +320,12 @@ proc genStubs::addPlatformGuard {plat iftxt {eltxt {}}} { append text "#endif /* AQUA */\n" } x11 { - append text "#if !(defined(__WIN32__) || defined(MAC_OSX_TK))\ - /* X11 */\n${iftxt}" + append text "#if !(defined(__WIN32__)" + if {$withCygwin} { + append text " || defined(__CYGWIN__)" + } + append text " || defined(MAC_OSX_TK))\ + /* X11 */\n${iftxt}" if {$eltxt ne ""} { append text "#else /* X11 */\n${eltxt}" } @@ -799,7 +811,7 @@ proc genStubs::forAllStubs {name slotProc onAll textVar eval {append temp} $skipString } } - append text [addPlatformGuard $plat $temp] + append text [addPlatformGuard $plat $temp {} true] } ## win ## if {$block(win)} { @@ -813,7 +825,7 @@ proc genStubs::forAllStubs {name slotProc onAll textVar eval {append temp} $skipString } } - append text [addPlatformGuard $plat $temp] + append text [addPlatformGuard $plat $temp {} true] } ## macosx ## if {$block(macosx) && !$block(aqua) && !$block(x11)} { @@ -885,7 +897,7 @@ proc genStubs::forAllStubs {name slotProc onAll textVar } else { eval {set etxt} $skipString append temp [addPlatformGuard $plat [$slotProc \ - $name $stubs($name,$plat,$i) $i] $etxt] + $name $stubs($name,$plat,$i) $i] $etxt true] } set emit 1 break @@ -895,7 +907,7 @@ proc genStubs::forAllStubs {name slotProc onAll textVar eval {append temp} $skipString } } - append text [addPlatformGuard x11 $temp] + append text [addPlatformGuard x11 $temp {} true] } } } |