summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-05-24 10:54:50 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-05-24 10:54:50 (GMT)
commit3628c71caa5cc745e75c919fbf02240131221386 (patch)
tree6ac609393630b9f07c7b780d4904bdfd374d3b1c /tools
parent78bbbde35c3f53764827e54afe963af4ea244aa4 (diff)
parent68d4dd76ebfda8029af039e6f6fd403ca851ce21 (diff)
downloadtcl-3628c71caa5cc745e75c919fbf02240131221386.zip
tcl-3628c71caa5cc745e75c919fbf02240131221386.tar.gz
tcl-3628c71caa5cc745e75c919fbf02240131221386.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
Diffstat (limited to 'tools')
-rw-r--r--tools/genStubs.tcl32
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]
}
}
}