Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tk800.024: cygwin patches

0 views
Skip to first unread message

slaven...@berlin.de

unread,
Mar 11, 2002, 9:27:35 AM3/11/02
to
This is a multi-part message in MIME format.

------=____1015851603508_E6mOPt5OO_
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Hello Nick,

here's a patch for cygwin. I only tested the native
win32 build, not the X11 build.

Regards,
Slaven

--
berlin.de - meine stadt im netz. Jetzt eigene eMail-adresse @berlin.de sichern!
http://www.berlin.de/home/MeineStadt/Anmeldung

------=____1015851603508_E6mOPt5OO_
Content-Type: text/x-diff;
name="cygwin-patches"
Content-Disposition: inline;
filename="cygwin-patches"

diff --exclude Makefile.old -urb Tk800.024/Event/Event.xs new.Tk800.024/Event/Event.xs
--- Tk800.024/Event/Event.xs Mon Mar 11 12:26:29 2002
+++ new.Tk800.024/Event/Event.xs Mon Mar 11 13:09:29 2002
@@ -219,7 +219,7 @@
Lang_OSHandle(fd)
int fd;
{
-#ifdef WIN32
+#if defined(WIN32) && !defined(__CYGWIN__)
return win32_get_osfhandle(fd);
#else
return fd;
diff --exclude Makefile.old -urb Tk800.024/Makefile.PL new.Tk800.024/Makefile.PL
--- Tk800.024/Makefile.PL Mon Mar 11 12:26:29 2002
+++ new.Tk800.024/Makefile.PL Mon Mar 11 12:37:46 2002
@@ -154,7 +154,7 @@
}

sub MY::postamble {
- '
+ my $str = '

html : subdirs manifypods
@cd pod && $(MAKE) html $(PASTHRU)
@@ -184,6 +184,8 @@
$(MAKE) manifest

';
+ $str =~ s/DEFINE=.*// if($^O eq 'cygwin');
+ $str;
}


diff --exclude Makefile.old -urb Tk800.024/README.cygwin new.Tk800.024/README.cygwin
--- Tk800.024/README.cygwin Tue May 15 16:53:37 2001
+++ new.Tk800.024/README.cygwin Mon Mar 11 13:09:27 2002
@@ -90,7 +90,7 @@
(sometimes $^O eq 'MSWin32' is used instead of $Tk::platform
eq 'MSWin32' assuming they are equivalent and vice versa)
+ #define distinctions
- _WIN32 defined by gcc, if X11 need to undef
+ _WIN32 win_arch MSWin32
__WIN32__ win_arch MSWin32, also defined in pTk/Lang.h
WIN32 from #include <windows.h>
when precedes #include "perl.h" then need
@@ -107,7 +107,7 @@
README.cygwin MANIFEST
* documentation

- Makefile.PL Tk/MMutil.pm pTk/Makefile.PL
+ Makefile.PL Tk/MMutil.pm pTk/Makefile.PL myConfig
* make stuff

pTk/mTk/win/tkWinX.c
@@ -142,6 +142,9 @@
IO/IO.xs
* Cygwin has O_NONBLOCK

+ Event/Event.xs
+ * Lang_OSHandle: defined(WIN32) && !defined(__CYGWIN__)
+
TODO

+ Any way to have X11 and native Win32 versions available
@@ -149,6 +152,6 @@
+ Fix gcc warnings, mostly in pTk win32 flavor?
+ Test with cygwin-xfree X Server?

-Thu Aug 31 12:54:09 BST 2000
+Sun Jun 10 21:34:30 PST 2001
Eric Fifer
-efi...@dircon.co.uk
+eg...@columbia.edu
diff --exclude Makefile.old -urb Tk800.024/Tk/MMutil.pm new.Tk800.024/Tk/MMutil.pm
--- Tk800.024/Tk/MMutil.pm Mon Mar 11 12:26:29 2002
+++ new.Tk800.024/Tk/MMutil.pm Mon Mar 11 12:37:46 2002
@@ -238,13 +238,10 @@
push(@def,qw(-D__CYGWIN__));
if ($win_arch eq 'MSWin32')
{
- push(@def,qw(-D__WIN32__)) unless $self->{'DEFINE'} =~ /-D__WIN32__/;
+ push(@def,qw(-D__WIN32__ -D_WIN32))
+ unless $self->{'DEFINE'} =~ /-D__WIN32__/;
push(@def,qw(-DWIN32)) if $self->{'NAME'} eq 'Tk::pTk';
}
- elsif ($win_arch eq 'x')
- {
- push(@def,qw(-U_WIN32));
- }
}
foreach (@inc)
{
@@ -519,15 +516,11 @@
push(@opt,'LD' => 'gcc -shared');
if ($win_arch eq 'MSWin32')
{
- my $extra = "-lcomdlg32 -lgdi32";
+ my $extra = "-L/lib/w32api -lcomdlg32 -lgdi32";
my $libs = $att{'LIBS'}->[0];
$att{'LIBS'}->[0] = "$extra $libs";
- $att{'DEFINE'} .= ' -D__WIN32__';
+ $att{'DEFINE'} .= ' -D__WIN32__ -D_WIN32';
$att{'DEFINE'} .= ' -DWIN32' if($att{'NAME'} eq 'Tk::pTk');
- }
- elsif ($win_arch eq 'x')
- {
- $att{'DEFINE'} .= ' -U_WIN32';
}
}
if (delete $att{'ptk_include'})
diff --exclude Makefile.old -urb Tk800.024/myConfig new.Tk800.024/myConfig
--- Tk800.024/myConfig Sat Dec 30 17:12:37 2000
+++ new.Tk800.024/myConfig Mon Mar 11 12:37:46 2002
@@ -340,7 +340,7 @@
$define .= " -D__PM__";
$inc = "-I../pTk/mTk/xlib -I../../pTk/mTk/xlib -IpTk/mTk/xlib -ImTk/os2_rc";
$xlib = ""; # No library is needed
-} elsif ($IsWin32) {
+} elsif ($IsWin32 or $^O eq 'cygwin') {
$inc = '-I$(TKDIR)/pTk/mTk/xlib';
}

diff --exclude Makefile.old -urb Tk800.024/pTk/Xlib.excwin new.Tk800.024/pTk/Xlib.excwin
--- Tk800.024/pTk/Xlib.excwin Mon Mar 11 12:26:30 2002
+++ new.Tk800.024/pTk/Xlib.excwin Mon Mar 11 12:37:46 2002
@@ -39,3 +39,4 @@
XOpenDisplay
XLoadQueryFont
XCreateWindow
\ No newline at end of file
+XRectInRegion
diff --exclude Makefile.old -urb Tk800.024/pTk/mTk/win/tkWinPort.h new.Tk800.024/pTk/mTk/win/tkWinPort.h
--- Tk800.024/pTk/mTk/win/tkWinPort.h Sat Dec 30 17:12:37 2000
+++ new.Tk800.024/pTk/mTk/win/tkWinPort.h Mon Mar 11 13:19:12 2002
@@ -51,7 +51,9 @@

#define NBBY 8

-#define OPEN_MAX 32
+#ifndef OPEN_MAX
+# define OPEN_MAX 32
+#endif

/*
* The following define causes Tk to use its internal keysym hash table

------=____1015851603508_E6mOPt5OO_--

-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server. If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to majo...@lists.stanford.edu

0 new messages