Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <779F20BCCE5AD31186A50008C75D9979171799@silldn_mail1.sanwaint.com> From: "Fifer, Eric" To: "'Cygwin'" Cc: "'iain AT kremlinux DOT demon DOT co DOT uk'" , "'efifer AT dircon DOT co DOT uk'" , "'Neil Lunn'" Subject: RE: Perl/Tk Date: Thu, 31 Aug 2000 16:14:26 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: multipart/mixed; boundary="----_=_NextPart_000_01C0135E.26EE5120" ------_=_NextPart_000_01C0135E.26EE5120 Content-Type: text/plain; charset="iso-8859-1" I've just finished some patches to Tk800.022 that allow you to build Tk for the Perl Cygwin port. Unpack the Tk module and apply the attached patch: cd Tk800.022 patch -p1 =0A= #include =0A= #endif=0A= =0A= +#ifdef __CYGWIN__=0A= +# undef WIN32=0A= +#endif=0A= #include =0A= #include =0A= #include =0A= diff -urN Tk800.022.orig/DragDrop/site_test = Tk800.022/DragDrop/site_test=0A= --- Tk800.022.orig/DragDrop/site_test Sat Aug 21 21:03:26 1999=0A= +++ Tk800.022/DragDrop/site_test Thu Aug 31 15:49:25 2000=0A= @@ -3,7 +3,11 @@=0A= use strict;=0A= use Tk::DropSite;=0A= use vars qw($kind $STRING $FILE_NAME); =0A= -BEGIN { $kind =3D ($^O eq 'MSWin32') ? ['Win32'] : = ['Sun','XDND','KDE'] }=0A= +BEGIN=0A= +{=0A= + $kind =3D ($^O eq 'MSWin32' or ($^O eq 'cygwin' and $Tk::platform eq = 'MSWin32'))?=0A= + ['Win32'] : ['Sun','XDND','KDE']=0A= +}=0A= use Tk::DropSite @$kind;=0A= use Tk::DragDrop @$kind;=0A= use Tk::Menubar; =0A= diff -urN Tk800.022.orig/IO/IO.xs Tk800.022/IO/IO.xs=0A= --- Tk800.022.orig/IO/IO.xs Sat Jul 31 10:45:19 1999=0A= +++ Tk800.022/IO/IO.xs Thu Aug 31 15:49:25 2000=0A= @@ -79,7 +79,7 @@=0A= static int restore_mode _((PerlIO *f,int mode));=0A= static int make_nonblock _((PerlIO *f,int *mode,int *newmode));=0A= =0A= -#ifdef __WIN32__=0A= +#if defined(__WIN32__) && !defined(__CYGWIN__)=0A= static int=0A= make_nonblock(f,mode,newmode)=0A= PerlIO *f;=0A= diff -urN Tk800.022.orig/MANIFEST Tk800.022/MANIFEST=0A= --- Tk800.022.orig/MANIFEST Mon May 1 21:14:25 2000=0A= +++ Tk800.022/MANIFEST Thu Aug 31 15:49:25 2000=0A= @@ -125,6 +125,7 @@=0A= README.linux=0A= README.os2=0A= README.ultrix=0A= +README.cygwin=0A= Scale/Makefile.PL=0A= Scale/Scale.pm=0A= Scale/Scale.xs=0A= diff -urN Tk800.022.orig/Makefile.PL Tk800.022/Makefile.PL=0A= --- Tk800.022.orig/Makefile.PL Sat Apr 29 10:28:28 2000=0A= +++ Tk800.022/Makefile.PL Thu Aug 31 15:49:26 2000=0A= @@ -11,7 +11,7 @@=0A= $win_arch =3D shift @ARGV if @ARGV and $ARGV[0] =3D~ = /^(open32|pm|x|MSWin32)$/;=0A= require('fix_4_os2.pl'), OS2_massage() if $^O eq 'os2';=0A= =0A= - $win_arch =3D ($IsWin32) ? 'MSWin32' : 'x'=0A= + $win_arch =3D ($IsWin32 or $^O eq 'cygwin') ? 'MSWin32' : 'x'=0A= if not defined $win_arch; # Currently 'x', 'pm', 'open32', = 'MSWin32'=0A= =0A= require "./myConfig";=0A= @@ -106,6 +106,10 @@=0A= ($Config{'cc'} =3D~ /^gcc/i) ?=0A= 'pTk\\tkres$(OBJ_EXT)' : 'pTk\\tk.res');=0A= }=0A= + }=0A= + if ($win_arch eq 'MSWin32' and $^O eq 'cygwin')=0A= + {=0A= + push(@{$self->{'O_FILES'}}, 'pTk/tkres$(OBJ_EXT)');=0A= }=0A= $ret;=0A= }=0A= diff -urN Tk800.022.orig/README.cygwin Tk800.022/README.cygwin=0A= --- Tk800.022.orig/README.cygwin Thu Jan 1 00:00:00 1970=0A= +++ Tk800.022/README.cygwin Thu Aug 31 15:49:48 2000=0A= @@ -0,0 +1,154 @@=0A= +=0A= +This is a brief description of how to get the Tk module working = with=0A= +Perl and Cygwin.=0A= +=0A= +CONFIGURE/BUILD=0A= +=0A= + Use native Win32 GUI calls:=0A= +=0A= + perl Makefile.PL=0A= +=0A= + Use X11 client libraries (and requires a X server):=0A= +=0A= + Precompiled X11 client libraries can be downloaded from=0A= + ftp://sourceware.cygnus.com/pub/cygwin/xfree/xc-4-binaries/=0A= + xfree86-4.0-DLLs.tar.bz2=0A= + xfree86-4.0-devel.tar.bz2=0A= +=0A= + NOTE: Your DISPLAY must be 127.0.0.1:0.0=0A= + Your PATH must include the DLL directory, = /usr/X11R6/bin=0A= +=0A= + perl Makefile.PL x=0A= +=0A= + make=0A= +=0A= +TEST=0A= +=0A= + make test=0A= + perl -Mblib demos/widget=0A= +=0A= +INSTALL=0A= +=0A= + make install=0A= +=0A= +SIDE-BY-SIDE PORT COMPARISONS (demos/widget)=0A= +=0A= + X11 (Hummingbird/Exceed X Server, V6.1)=0A= +=0A= + + Motif look and feel=0A= + + Scroll wheel does not work with X11 (config?)=0A= + + Global grabs only affect X11 windows (config?)=0A= + + Menus, normal style=0A= + - Alt+x does not post menus (config?)=0A= + + $Tk::platform =3D> unix=0A= +=0A= + Win32=0A= +=0A= + + Windows look and feel=0A= + + Uses Win32 clipboard=0A= + + Help on menu bar not all the way to the right=0A= + + Tear-off menus placed at upper-left instead of near = pointer=0A= + + Tile and Transparent, no tiled camels, third window not=0A= + transparent=0A= + + Menus, normal style=0A= + - File - "Error: unknown option "-label" at Tk.pm line = 217=0A= + + Menus, Perl/Tk style=0A= + - Menus do not drop as traverse with button press=0A= + - Alt+x does not post menus=0A= + + Native Win32 FileSelect dialog, FileSelect/FBox the same=0A= + + Native Win32 ChooseColor dialog=0A= + + Balls bouncing, when start restacked below widget demo = window=0A= + (if bounce window not moved)=0A= + + Global grabs only affect current application=0A= + + IntelliMouse with IntelliEye (but ok with a trackball, = setting?)=0A= + - Button-2 dragging/scanning does not work well=0A= + - Button-2 for copy/paste does not work well=0A= + (seems to flip into a scroll mode)=0A= + + $Tk::TkwinVtab, $Tk::TkwinintVtab variables=0A= + + $Tk::platform =3D> MSWin32=0A= +=0A= + Both=0A= + + Tear-off menus restack parent below widget demo window=0A= + + Meta-backspace, Meta-d not working (Meta config?)=0A= + + Menus, normal and Perl/Tk style=0A= + - Meta+x accelerators (Control+x okay) not working = (config?)=0A= +=0A= + X11 (Cygwin) v X11 (Solaris)=0A= +=0A= + No differences that I could find!=0A= +=0A= + Win32 (Cygwin) v Win32 (MSWin32/ActiveState)=0A= +=0A= + + Menus, normal style=0A= + - Accelerators Win32 bound to Control, Cygwin bound to = Meta=0A= + (see demos/demos/widget_lib/menus.pl, $^O eq 'MSWin32')=0A= + - Win32 ^A does not work (Meta+A with X11), ^H does=0A= +=0A= +PORTING NOTES=0A= +=0A= + + $Tk::platform is really the win_arch, where unix is x=0A= + (sometimes $^O eq 'MSWin32' is used instead of $Tk::platform=0A= + eq 'MSWin32' assuming they are equivalent and vice versa)=0A= + + #define distinctions=0A= + _WIN32 defined by gcc, if X11 need to undef=0A= + __WIN32__ win_arch MSWin32, also defined in = pTk/Lang.h=0A= + WIN32 from #include =0A= + when precedes #include "perl.h" then = need=0A= + a #undef WIN32 (otherwise tries to = include=0A= + Win32 Perl things like win32.h, = defined=0A= + by native Win32 port)=0A= + + With native Win32 GUI use Cygwin select() with /dev/windows=0A= + pseudo-device rather than using Win32 GetMessage() directly=0A= + + pTk/mTk/win/tkWinX.c, pTk/mTk/generic/tkPort.h part of core = Tk,=0A= + which is ordinarily not touched by Tk Perl module? = pTk/Tcl-pTk?=0A= +=0A= +FILES (with Cygwin references)=0A= +=0A= + README.cygwin MANIFEST=0A= + * documentation=0A= +=0A= + Makefile.PL Tk/MMutil.pm pTk/Makefile.PL=0A= + * make stuff=0A= +=0A= + pTk/mTk/win/tkWinX.c=0A= + * GetMessage() via select() on /dev/windows and callback=0A= +=0A= + Scrollbar/Scrollbar.xs tkWin32Dll.c=0A= + * defined(__WIN32__) && defined(__CYGWIN__)=0A= +=0A= + tkGlue.c=0A= + * refdef XS because __declspec(dllexport) incompatible with = static=0A= + * defined(__WIN32__) && defined(__CYGWIN__) and pTk/tkWin.h=0A= + includes which defines WIN32=0A= +=0A= + Tk.pm=0A= + * set $Tk::platform with help from $Tk::Config::win_arch=0A= +=0A= + DragDrop/site_test Tk/X11Font.pm t/create.t t/mwm.t=0A= + * $^O eq 'cygwin' and $Tk::platform eq 'MSWin32'=0A= +=0A= + DragDrop/Win32Site/Win32Site.xs=0A= + * #undef WIN32 from =0A= +=0A= + pTk/mTk/generic/tkPort.h=0A= + * resolve strcasecmp/stricmp #define mess=0A= +=0A= + pTk/Lang.h=0A= + * some defs ordinarily from tkUnixPort.h=0A= +=0A= + chnGlue.c=0A= + * Cygwin has O_BINARY=0A= +=0A= + IO/IO.xs=0A= + * Cygwin has O_NONBLOCK=0A= +=0A= +TODO=0A= +=0A= + + Any way to have X11 and native Win32 versions available=0A= + at the same time? Build with Xlib/Win32 emulator (see rxvt)?=0A= + + Fix gcc warnings, mostly in pTk win32 flavor?=0A= + + Test with cygwin-xfree X Server?=0A= +=0A= +Thu Aug 31 12:54:09 BST 2000=0A= +Eric Fifer=0A= +efifer AT dircon DOT co DOT uk=0A= diff -urN Tk800.022.orig/Scrollbar/Scrollbar.xs = Tk800.022/Scrollbar/Scrollbar.xs=0A= --- Tk800.022.orig/Scrollbar/Scrollbar.xs Tue Jul 27 19:20:07 1999=0A= +++ Tk800.022/Scrollbar/Scrollbar.xs Thu Aug 31 15:49:26 2000=0A= @@ -12,7 +12,7 @@=0A= =0A= #include "pTk/tkPort.h"=0A= #include "pTk/tkInt.h"=0A= -#ifdef WIN32=0A= +#if defined(WIN32) || (defined(__WIN32__) && defined(__CYGWIN__))=0A= #include "pTk/tkWin.h"=0A= #include "pTk/tkWinInt.h"=0A= #endif=0A= diff -urN Tk800.022.orig/Tk/MMutil.pm Tk800.022/Tk/MMutil.pm=0A= --- Tk800.022.orig/Tk/MMutil.pm Thu Mar 30 21:37:15 2000=0A= +++ Tk800.022/Tk/MMutil.pm Thu Aug 31 15:49:26 2000=0A= @@ -222,6 +222,19 @@=0A= my @inc =3D split(/\s+/,$self->{'INC'});=0A= my @def =3D split(/\s+/,$self->{'DEFINE'});=0A= push(@def,qw(-DWIN32 -D__WIN32__)) if ($IsWin32);=0A= + if ($^O eq 'cygwin')=0A= + {=0A= + push(@def,qw(-D__CYGWIN__));=0A= + if ($win_arch eq 'MSWin32')=0A= + {=0A= + push(@def,qw(-D__WIN32__)) unless $self->{'DEFINE'} =3D~ = /-D__WIN32__/;=0A= + push(@def,qw(-DWIN32)) if $self->{'NAME'} eq 'Tk::pTk';=0A= + }=0A= + elsif ($win_arch eq 'x')=0A= + {=0A= + push(@def,qw(-U_WIN32));=0A= + }=0A= + }=0A= foreach (@inc)=0A= {=0A= s/\$\(TKDIR\)/$tk/g;=0A= @@ -486,6 +499,25 @@=0A= my $extra =3D "-L$base -lcomdlg32 -lgdi32";=0A= my $libs =3D $att{'LIBS'}->[0];=0A= $att{'LIBS'}->[0] =3D "$extra $libs";=0A= + }=0A= + if ($^O eq 'cygwin')=0A= + {=0A= + # NOTE: use gcc -shared instead of dllwrap (ld2),=0A= + # dllwrap tries to resolve all symbols, even those=0A= + # that are brought in from libraries like libpTk.a=0A= + push(@opt,'LD' =3D> 'gcc -shared');=0A= + if ($win_arch eq 'MSWin32')=0A= + {=0A= + my $extra =3D "-lcomdlg32 -lgdi32";=0A= + my $libs =3D $att{'LIBS'}->[0];=0A= + $att{'LIBS'}->[0] =3D "$extra $libs";=0A= + $att{'DEFINE'} .=3D ' -D__WIN32__';=0A= + $att{'DEFINE'} .=3D ' -DWIN32' if($att{'NAME'} eq = 'Tk::pTk');=0A= + }=0A= + elsif ($win_arch eq 'x')=0A= + {=0A= + $att{'DEFINE'} .=3D ' -U_WIN32';=0A= + }=0A= }=0A= if (delete $att{'ptk_include'})=0A= {=0A= diff -urN Tk800.022.orig/Tk/X11Font.pm Tk800.022/Tk/X11Font.pm=0A= --- Tk800.022.orig/Tk/X11Font.pm Fri Dec 24 09:41:43 1999=0A= +++ Tk800.022/Tk/X11Font.pm Thu Aug 31 15:49:26 2000=0A= @@ -94,7 +94,7 @@=0A= my $me =3D shift;=0A= my $max =3D wantarray ? shift || 128 : 1;=0A= =0A= - if ($^O eq 'MSWin32')=0A= + if ($^O eq 'MSWin32' or ($^O eq 'cygwin' and $Tk::platform eq = 'MSWin32'))=0A= {=0A= my $name =3D $me->{Name};=0A= if (!defined $name)=0A= diff -urN Tk800.022.orig/Tk.pm Tk800.022/Tk.pm=0A= --- Tk800.022.orig/Tk.pm Sat Apr 29 10:36:41 2000=0A= +++ Tk800.022/Tk.pm Thu Aug 31 15:49:26 2000=0A= @@ -17,7 +17,18 @@=0A= =0A= *fileevent =3D \&Tk::Event::IO::fileevent;=0A= =0A= -BEGIN { $Tk::platform =3D ($^O eq 'MSWin32') ? $^O : 'unix' };=0A= +BEGIN {=0A= + if($^O eq 'cygwin')=0A= + {=0A= + require Tk::Config;=0A= + $Tk::platform =3D $Tk::Config::win_arch;=0A= + $Tk::platform =3D 'unix' if $Tk::platform eq 'x';=0A= + }=0A= + else=0A= + {=0A= + $Tk::platform =3D ($^O eq 'MSWin32') ? $^O : 'unix';=0A= + }=0A= +};=0A= =0A= $Tk::tearoff =3D 1 if ($Tk::platform eq 'unix');=0A= =0A= diff -urN Tk800.022.orig/chnGlue.c Tk800.022/chnGlue.c=0A= --- Tk800.022.orig/chnGlue.c Tue Jul 27 19:20:11 1999=0A= +++ Tk800.022/chnGlue.c Thu Aug 31 15:49:26 2000=0A= @@ -93,7 +93,7 @@=0A= {=0A= if (strcmp(newValue,"binary") =3D=3D 0)=0A= {=0A= -#if defined(WIN32) || defined(__EMX__)=0A= +#if defined(WIN32) || defined(__EMX__) || defined(__CYGWIN__)=0A= setmode(PerlIO_fileno(f), O_BINARY);=0A= #endif=0A= return TCL_OK;=0A= diff -urN Tk800.022.orig/pTk/Lang.h Tk800.022/pTk/Lang.h=0A= --- Tk800.022.orig/pTk/Lang.h Fri Apr 21 09:13:10 2000=0A= +++ Tk800.022/pTk/Lang.h Thu Aug 31 15:49:26 2000=0A= @@ -43,6 +43,11 @@=0A= # define strcasecmp stricmp=0A= #endif=0A= =0A= +#ifdef __CYGWIN__=0A= +#include =0A= +#define MASK_SIZE howmany(FD_SETSIZE, NFDBITS)=0A= +#endif=0A= +=0A= /*=0A= * When version numbers change here, must also go into the following = files=0A= * and update the version numbers:=0A= diff -urN Tk800.022.orig/pTk/Makefile.PL Tk800.022/pTk/Makefile.PL=0A= --- Tk800.022.orig/pTk/Makefile.PL Tue Jul 27 19:20:25 1999=0A= +++ Tk800.022/pTk/Makefile.PL Thu Aug 31 15:49:26 2000=0A= @@ -45,6 +45,10 @@=0A= {=0A= @list =3D qw(win xlib additions generic tixWin tixGeneric tclWin = tclGeneric);=0A= }=0A= + elsif ($win_arch eq 'MSWin32' and $^O eq 'cygwin')=0A= + {=0A= + @list =3D qw(win xlib additions generic tixWin tixGeneric tclUnix = tclGeneric);=0A= + }=0A= elsif ($win_arch eq 'open32')=0A= {=0A= @list =3D qw(open32 open32/h win xlib additions generic tixWin = tixGeneric tclUnix tclGeneric );=0A= @@ -145,7 +149,8 @@=0A= $self->{PM}->{$name} =3D $self->catfile($dir,$name);=0A= }=0A= =0A= - if ($Tk::MMutil::IsWin32 or $win_arch eq 'open32' or $win_arch eq = 'pm')=0A= + if ($Tk::MMutil::IsWin32 or $win_arch eq 'open32' or $win_arch eq = 'pm' or=0A= + ($win_arch eq 'MSWin32' and $^O eq 'cygwin'))=0A= {my $ddir =3D $self->catdir('$(INST_ARCHLIBDIR)','X11');=0A= my $sdir =3D $self->catdir('mTk','xlib','X11');=0A= push(@{$self->{'dir_targets'}},$ddir);=0A= @@ -228,7 +233,7 @@=0A= $dep .=3D "config :: " . join(" = \\\n\t",map($self->catfile($_,".exists"),@{$self->{'dir_targets'}})) = .=0A= "\n\t".$self->{NOECHO}."\$(NOOP)\n";=0A= =0A= -if ($Tk::MMutil::IsWin32)=0A= +if ($Tk::MMutil::IsWin32 or ($win_arch eq 'MSWin32' and $^O eq = 'cygwin'))=0A= {=0A= my $cc =3D $Config{'cc'};=0A= my $file =3D 'tk.res';=0A= diff -urN Tk800.022.orig/pTk/mTk/generic/tkPort.h = Tk800.022/pTk/mTk/generic/tkPort.h=0A= --- Tk800.022.orig/pTk/mTk/generic/tkPort.h Tue Jul 27 19:20:32 1999=0A= +++ Tk800.022/pTk/mTk/generic/tkPort.h Thu Aug 31 15:49:26 2000=0A= @@ -29,6 +29,9 @@=0A= # ifndef strcasecmp=0A= # define strcasecmp(a,b) stricmp(a,b)=0A= # endif=0A= +# ifdef __CYGWIN__=0A= +# undef strcasecmp=0A= +# endif=0A= #else=0A= # if defined(MAC_TCL)=0A= # include "tkMacPort.h"=0A= diff -urN Tk800.022.orig/pTk/mTk/win/tkWinX.c = Tk800.022/pTk/mTk/win/tkWinX.c=0A= --- Tk800.022.orig/pTk/mTk/win/tkWinX.c Mon Mar 27 15:07:36 2000=0A= +++ Tk800.022/pTk/mTk/win/tkWinX.c Thu Aug 31 15:49:26 2000=0A= @@ -53,6 +53,10 @@=0A= * Forward declarations of procedures used in this file.=0A= */=0A= =0A= +#ifdef __CYGWIN__=0A= +static void DisplayFileProc _ANSI_ARGS_((ClientData clientData,=0A= + int flags));=0A= +#endif=0A= static void GenerateXEvent _ANSI_ARGS_((HWND hwnd, UINT message,=0A= WPARAM wParam, LPARAM lParam));=0A= static unsigned int GetState _ANSI_ARGS_((UINT message, WPARAM = wParam,=0A= @@ -384,6 +388,12 @@=0A= AllocNone);=0A= winDisplay =3D (TkDisplay *) ckalloc(sizeof(TkDisplay));=0A= winDisplay->display =3D display;=0A= +#ifdef __CYGWIN__=0A= + if((ConnectionNumber(display) =3D open("/dev/windows", O_RDONLY)) = < 0)=0A= + return NULL;=0A= + Tcl_CreateFileHandler(ConnectionNumber(display), TCL_READABLE,=0A= + DisplayFileProc, (ClientData) winDisplay);=0A= +#endif=0A= return winDisplay;=0A= }=0A= =0C=0A= @@ -447,9 +457,63 @@=0A= }=0A= ckfree((char *) display->screens);=0A= }=0A= +#ifdef __CYGWIN__=0A= + if (dispPtr->display !=3D 0) {=0A= + Tcl_DeleteFileHandler(ConnectionNumber(dispPtr->display));=0A= + close(ConnectionNumber(dispPtr->display));=0A= + }=0A= +#endif=0A= ckfree((char *) display);=0A= ckfree((char *) dispPtr);=0A= }=0A= +=0C=0A= +#ifdef __CYGWIN__=0A= +/*=0A= + = *----------------------------------------------------------------------=0A= + *=0A= + * DisplayFileProc --=0A= + *=0A= + * This procedure implements the file handler for the /dev/windows=0A= + * connection.=0A= + *=0A= + * Results:=0A= + * None.=0A= + *=0A= + * Side effects:=0A= + * Process Win32 message queue. Compare to tclWin/tclWinNotify.c=0A= + * Tcl_WaitForEvent() event loop.=0A= + *=0A= + = *----------------------------------------------------------------------=0A= + */=0A= +=0A= +static void=0A= +DisplayFileProc(clientData, flags)=0A= + ClientData clientData; /* The display pointer. */=0A= + int flags; /* Should be TCL_READABLE. */=0A= +{=0A= + TkDisplay *dispPtr =3D (TkDisplay *) clientData;=0A= + Display *display =3D dispPtr->display;=0A= + MSG msg;=0A= + int n;=0A= +=0A= + /* NOTE: read returns the result of GetMessage */=0A= + /* *not* the number of bytes read */=0A= + n =3D read(ConnectionNumber(display), &msg, sizeof(MSG));=0A= + if(n =3D=3D 0) {=0A= + /*=0A= + * The application is exiting, so repost the quit message=0A= + * and start unwinding.=0A= + */=0A= +=0A= + PostQuitMessage(msg.wParam);=0A= + return;=0A= + }=0A= + if(n > 0) {=0A= + TranslateMessage(&msg);=0A= + DispatchMessage(&msg);=0A= + }=0A= +}=0A= +#endif=0A= =0C=0A= /*=0A= = *----------------------------------------------------------------------=0A= diff -urN Tk800.022.orig/t/create.t Tk800.022/t/create.t=0A= --- Tk800.022.orig/t/create.t Sun Mar 26 13:25:56 2000=0A= +++ Tk800.022/t/create.t Thu Aug 31 15:49:27 2000=0A= @@ -61,7 +61,10 @@=0A= )=0A= );=0A= =0A= - @class =3D grep(!/InputO/,@class) if ($^O eq 'MSWin32');=0A= + require Tk if ($^O eq 'cygwin');=0A= + @class =3D grep(!/InputO/,@class) if ($^O eq 'MSWin32' or=0A= + ($^O eq 'cygwin' and defined($Tk::platform)=0A= + and $Tk::platform eq 'MSWin32'));=0A= =0A= plan test =3D> (13*@class+3);=0A= =0A= diff -urN Tk800.022.orig/t/mwm.t Tk800.022/t/mwm.t=0A= --- Tk800.022.orig/t/mwm.t Tue Jul 27 19:21:22 1999=0A= +++ Tk800.022/t/mwm.t Thu Aug 31 15:49:27 2000=0A= @@ -1,7 +1,8 @@=0A= BEGIN =0A= { =0A= $^W =3D 1; $| =3D 1; =0A= - if ($^O eq 'MSWin32')=0A= + require Tk if ($^O eq 'cygwin');=0A= + if ($^O eq 'MSWin32' or ($^O eq 'cygwin' and $Tk::platform eq = 'MSWin32'))=0A= {=0A= print "1..0\n";=0A= exit;=0A= diff -urN Tk800.022.orig/tkGlue.c Tk800.022/tkGlue.c=0A= --- Tk800.022.orig/tkGlue.c Fri Apr 21 09:13:10 2000=0A= +++ Tk800.022/tkGlue.c Thu Aug 31 15:49:27 2000=0A= @@ -8,6 +8,10 @@=0A= #include =0A= #include =0A= #include =0A= +#ifdef __CYGWIN__=0A= +# undef XS=0A= +# define XS(name) void name(pTHXo_ CV* cv)=0A= +#endif=0A= =0A= #define Tkgv_fullname(x,y,z) gv_fullname3(x,y,z)=0A= =0A= @@ -26,7 +30,7 @@=0A= #include "pTk/Xlib_f.h"=0A= #include "pTk/tkEvent.h"=0A= #include "pTk/tkEvent.m"=0A= -#ifdef WIN32=0A= +#if defined(WIN32) || (defined(__WIN32__) && defined(__CYGWIN__))=0A= #include "pTk/tkWin.h"=0A= #include "pTk/tkWinInt.h"=0A= #include "pTk/tkWin_f.h"=0A= @@ -5123,7 +5127,7 @@=0A= Lang_OSHandle(fd)=0A= int fd;=0A= {=0A= -#ifdef WIN32=0A= +#if defined(WIN32) && !defined(__CYGWIN__)=0A= return win32_get_osfhandle(fd);=0A= #else=0A= return fd;=0A= diff -urN Tk800.022.orig/tkWin32Dll.c Tk800.022/tkWin32Dll.c=0A= --- Tk800.022.orig/tkWin32Dll.c Tue Jul 27 19:21:23 1999=0A= +++ Tk800.022/tkWin32Dll.c Thu Aug 31 15:49:27 2000=0A= @@ -13,7 +13,7 @@=0A= =0A= #include "pTk/tkPort.h"=0A= =0A= -#ifdef WIN32=0A= +#if defined(WIN32) || (defined(__WIN32__) && defined(__CYGWIN__))=0A= =0A= #include "pTk/tkWinInt.h"=0A= =0A= ------_=_NextPart_000_01C0135E.26EE5120 Content-Type: text/plain; charset=us-ascii -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com ------_=_NextPart_000_01C0135E.26EE5120--