* Why is PASCAL undefined in win/tclWinPort.h?
@ 2002-09-04 22:36 Mo DeJong
2002-09-05 6:17 ` Keith Seitz
0 siblings, 1 reply; 4+ messages in thread
From: Mo DeJong @ 2002-09-04 22:36 UTC (permalink / raw)
To: Insight
Hello.
A user on the Source-Navigator list tracked down a problem calling gnu client under
Windows. It seems the cause was the "#define PASCAL" in the sources version
of win/tclWinPort.h.
Sources version of Tcl 8.3:
#include <winsock2.h>
#define WIN32_LEAN_AND_MEAN
#define __USE_W32_SOCKETS
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
#ifdef _MSC_VER
#define PASCAL
#endif
Net version of Tcl 8.3:
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
#include <winsock2.h>
Why would the sources verson differ? I have no idea. This only matters for
a VC++ compiled program, so I can't imagine it could effect Insight in any
way. The only ChangeLog entry I could find on the subject seems to suggest
that the code is not correct.
1998-11-24 Syd Polk <spolk@cygnus.com>
* win/Makefile.in: Under MSVC, use the Tcl dumpexts method
to generate exports.
* win/tclWinPort.h tclWinSock.c: Do not #define PASCAL away.
It is needed in calls to DLLs.
Any objections to removing that undefine? I will do some more testing
before posting a patch, I was just wondering if this rings a bell with
anyone.
thanks
Mo DeJong
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Why is PASCAL undefined in win/tclWinPort.h?
2002-09-04 22:36 Why is PASCAL undefined in win/tclWinPort.h? Mo DeJong
@ 2002-09-05 6:17 ` Keith Seitz
2002-09-12 17:46 ` Mo DeJong
0 siblings, 1 reply; 4+ messages in thread
From: Keith Seitz @ 2002-09-05 6:17 UTC (permalink / raw)
To: Mo DeJong; +Cc: Insight
On Wed, 4 Sep 2002, Mo DeJong wrote:
> Why would the sources verson differ? I have no idea. This only matters for
> a VC++ compiled program, so I can't imagine it could effect Insight in any
> way. The only ChangeLog entry I could find on the subject seems to suggest
> that the code is not correct.
According to the CVS log, the #define PASCAL line was touched last by irox
in version 1.5 (2001-09-13). These lines do not appear in version 1.4 of
the file, so irox must have added them... The ChangeLog for it:
2001-09-12 Ian Roxborough <irox@redhat.com>
* Makefile.in: Add 'cygwin' subdirectory to 'make all'
target.
* configure.in: Configure 'cygwin' and 'win' directory
for a cygwin host.
* configure: Regenerated.
* cygwin/configure.in: Change version number to 8.3.
* cygwin/configure: Regenerated.
* cygwin/Makefile.am: Added/removed files to be build
for Tcl8.3.
* cygwin/Makefile.in: Regenerated.
* generic/tcl.h: Don't define __WIN32__ for cygwin or
mwing32 builds. Don't define USE_TCLALLOC when building
for cygwin. Don't use __declspec unless building Tcl or
tk or build with USE_TCL_STUBS.
* generic/tclAlloc.c: For cygwin hosts, don't using
anything in this file unless build with __TCL_UNIX_VARIANT.
* generic/tclClock.c: Declare 'timezone' as an int, if it
hasn't been #defined.
* generic/tclStubInit.c: Don't export any tclAlloc function
when build for a cygwin host.
* win/configure.in: Set DL_LIBS and MATH_LIBS. Create
unix/tclConfig.sh.
* win/configure: Regenerated.
* win/tclWinPort.h: Added missing #endif.
* win/tclWinFile.c (TclpChdir): Don't invert change
directory results on cygwin.
No mention of PASCAL...
> Any objections to removing that undefine? I will do some more testing
> before posting a patch, I was just wondering if this rings a bell with
> anyone.
I don't think we really care, since we would never have _MSC_VER defined
under cygwin. So it's entirely up to you.
Keith
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Why is PASCAL undefined in win/tclWinPort.h?
2002-09-05 6:17 ` Keith Seitz
@ 2002-09-12 17:46 ` Mo DeJong
2002-09-13 7:41 ` Keith Seitz
0 siblings, 1 reply; 4+ messages in thread
From: Mo DeJong @ 2002-09-12 17:46 UTC (permalink / raw)
To: insight
On Thu, 5 Sep 2002 06:20:06 -0700 (PDT)
Keith Seitz <keiths@redhat.com> wrote:
> On Wed, 4 Sep 2002, Mo DeJong wrote:
>
> > Why would the sources verson differ? I have no idea. This only matters for
> > a VC++ compiled program, so I can't imagine it could effect Insight in any
> > way. The only ChangeLog entry I could find on the subject seems to suggest
> > that the code is not correct.
>
> According to the CVS log, the #define PASCAL line was touched last by irox
> in version 1.5 (2001-09-13). These lines do not appear in version 1.4 of
> the file, so irox must have added them... The ChangeLog for it:
I did some more testing of this PASCAL define and it does seem to be
causing some problems. A `make test` does not pass with PASCAL undefined
and I have a report from a user that it causes failures in Source-Navigator.
The following patch should fix the problem and get the compile working
again under VC++ when the --enable-symbols flag is passed. This patch
should not have any effect on Insight.
thanks
Mo
2002-09-12 Mo DeJong <supermo@bayarea.net>
* win/tclWin32Dll.c (DllMain): Remove unused os
variable since VC++ treats warnings as errors
when compiling with symbols.
* win/tclWinPort.h: Remove undefine of PASCAL
symbol added on 2001-09-12. It caused
crashing problems with sockets.
Index: win/tclWin32Dll.c
===================================================================
RCS file: /cvs/src/src/tcl/win/tclWin32Dll.c,v
retrieving revision 1.4
diff -u -r1.4 tclWin32Dll.c
--- win/tclWin32Dll.c 9 Sep 2001 23:56:10 -0000 1.4
+++ win/tclWin32Dll.c 13 Sep 2002 00:32:23 -0000
@@ -190,8 +190,6 @@
DWORD reason; /* Reason this function is being called. */
LPVOID reserved; /* Not used. */
{
- OSVERSIONINFO os;
-
/* CYGNUS LOCAL */
#ifdef __CYGWIN__0
/* Cygwin requires the impure data pointer to be initialized
Index: win/tclWinPort.h
===================================================================
RCS file: /cvs/src/src/tcl/win/tclWinPort.h,v
retrieving revision 1.6
diff -u -r1.6 tclWinPort.h
--- win/tclWinPort.h 13 Sep 2001 18:27:55 -0000 1.6
+++ win/tclWinPort.h 13 Sep 2002 00:32:23 -0000
@@ -73,10 +73,6 @@
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
-#ifdef _MSC_VER
-#define PASCAL
-#endif
-
#ifdef BUILD_tcl
# undef TCL_STORAGE_CLASS
# define TCL_STORAGE_CLASS DLLEXPORT
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Why is PASCAL undefined in win/tclWinPort.h?
2002-09-12 17:46 ` Mo DeJong
@ 2002-09-13 7:41 ` Keith Seitz
0 siblings, 0 replies; 4+ messages in thread
From: Keith Seitz @ 2002-09-13 7:41 UTC (permalink / raw)
To: Mo DeJong; +Cc: insight
On Thu, 12 Sep 2002, Mo DeJong wrote:
Hmm. Actually, I don't think I alone can approve this... Hm, well, ok,
src/MAINTAINERS says "insight" for tcl/, tk/, itcl/, libgui/, and tix/, so
I guess I can.
Committed.
> 2002-09-12 Mo DeJong <supermo@bayarea.net>
>
> * win/tclWin32Dll.c (DllMain): Remove unused os
> variable since VC++ treats warnings as errors
> when compiling with symbols.
> * win/tclWinPort.h: Remove undefine of PASCAL
> symbol added on 2001-09-12. It caused
> crashing problems with sockets.
>
> Index: win/tclWin32Dll.c
> ===================================================================
> RCS file: /cvs/src/src/tcl/win/tclWin32Dll.c,v
> retrieving revision 1.4
> diff -u -r1.4 tclWin32Dll.c
> --- win/tclWin32Dll.c 9 Sep 2001 23:56:10 -0000 1.4
> +++ win/tclWin32Dll.c 13 Sep 2002 00:32:23 -0000
> @@ -190,8 +190,6 @@
> DWORD reason; /* Reason this function is being called. */
> LPVOID reserved; /* Not used. */
> {
> - OSVERSIONINFO os;
> -
> /* CYGNUS LOCAL */
> #ifdef __CYGWIN__0
> /* Cygwin requires the impure data pointer to be initialized
> Index: win/tclWinPort.h
> ===================================================================
> RCS file: /cvs/src/src/tcl/win/tclWinPort.h,v
> retrieving revision 1.6
> diff -u -r1.6 tclWinPort.h
> --- win/tclWinPort.h 13 Sep 2001 18:27:55 -0000 1.6
> +++ win/tclWinPort.h 13 Sep 2002 00:32:23 -0000
> @@ -73,10 +73,6 @@
> #include <windows.h>
> #undef WIN32_LEAN_AND_MEAN
>
> -#ifdef _MSC_VER
> -#define PASCAL
> -#endif
> -
> #ifdef BUILD_tcl
> # undef TCL_STORAGE_CLASS
> # define TCL_STORAGE_CLASS DLLEXPORT
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-09-13 14:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-04 22:36 Why is PASCAL undefined in win/tclWinPort.h? Mo DeJong
2002-09-05 6:17 ` Keith Seitz
2002-09-12 17:46 ` Mo DeJong
2002-09-13 7:41 ` Keith Seitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).