Updated OpenWatcom support patch

View: New views
9 Messages — Rating Filter:   Alert me  

Updated OpenWatcom support patch

by paul.blew :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
 
I hope this can be included for 2.6 - it replaces the broken OpenWatcom IDE based build with a makefile based one.
 
By the way, Sven's ATEXIT_HACK changes require me to define GLUT_DISABLE_ATEXIT_HACK for all my projects to compile under OpenWatcom.  Shouldn't the check as to whether to include the hack be around whether Visual C is being used to compile rather than whether the platform is Win32 (freeglut_std.h line 602) ?
 
Regards,
Paul
 


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@...
https://lists.sourceforge.net/lists/listinfo/freeglut-developer

freeglut_watcom.patch (25K) Download Attachment

Re: Updated OpenWatcom support patch

by Sven Panne :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am Mittwoch, 3. Juni 2009 11:09:28 schrieb paul.blew@...:
> I hope this can be included for 2.6 - it replaces the broken OpenWatcom IDE
> based build with a makefile based one.

I have no objections against this, I am not even sure how many other
OpenWatcom users are on this list to comment on your patch.

> By the way, Sven's ATEXIT_HACK changes require me to define
> GLUT_DISABLE_ATEXIT_HACK for all my projects to compile under OpenWatcom.

What exactly is the problem under OpenWatcom? Compilation error? Runtime
error? Warnings during compilation?

> Shouldn't the check as to whether to include the hack be around whether
> Visual C is being used to compile rather than whether the platform is Win32
> (freeglut_std.h line 602) ?

The #ifdefs are exactly like the ones in classic GLUT, so do you have the same
problems there?

Cheers,
   S.


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@...
https://lists.sourceforge.net/lists/listinfo/freeglut-developer

Parent Message unknown Re: Updated OpenWatcom support patch

by Sven Panne :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am Montag, 8. Juni 2009 09:30:44 schrieb paul.blew@...:

> The problem manifests itself as a compilation error (see attached).  It is
> complaining that the arguments for __glutInitWithExit do not match those in
> the prototype.
>
> It's been a while since I used classic GLUT, but I have a dim and distant
> memory that it was a problem there too. It seems that there is an
> assumption that if you are on Windows you must be using MSVC.
>
> A simple fix would be changing line 602 from:
>
> #if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
>
> to either:
>
> #if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) &&
> !defined(__WATCOMC__)
>
> or:
>
> #if defined(_MSC_VER) && !defined(GLUT_DISABLE_ATEXIT_HACK)

OK, now I understand the problem: For some obscure reason, Watcom uses a
different, non-standard calling convention for C's "exit" function ("watcall"
vs. "cdecl") than all other C runtimes. This leads to a mismatch in our
prototype and even more problems in classic GLUT.

I think doing this differently is a very, very bad idea from Watcom, so I'm
simply disabling the atexit hack for Watcom only, i.e. use the first fix you
proposed. The reason for fixing it this way is that we stay as close to
original GLUT as possible. I don't know e.g. is the atexit hack is necessary
for other development environments/runtimes, e.g. MinGW, so let's be
conservative...

Anyway, this was no show stopper, so where is our 2.6.0 release? :-(

Cheers,
   S.


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@...
https://lists.sourceforge.net/lists/listinfo/freeglut-developer

Parent Message unknown Re: Updated OpenWatcom support patch

by paul.blew :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sounds good to me - thanks.

-----Original Message-----
From: Sven Panne [mailto:Sven.Panne@...]
Sent: Thursday, June 11, 2009 9:25 AM
To: Paul Blew; freeglut-developer@...
Subject: Re: [Freeglut-developer] Updated OpenWatcom support patch

Am Montag, 8. Juni 2009 09:30:44 schrieb paul.blew@...:

> The problem manifests itself as a compilation error (see attached).  
> It is complaining that the arguments for __glutInitWithExit do not
> match those in the prototype.
>
> It's been a while since I used classic GLUT, but I have a dim and
> distant memory that it was a problem there too. It seems that there is
> an assumption that if you are on Windows you must be using MSVC.
>
> A simple fix would be changing line 602 from:
>
> #if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
>
> to either:
>
> #if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) &&
> !defined(__WATCOMC__)
>
> or:
>
> #if defined(_MSC_VER) && !defined(GLUT_DISABLE_ATEXIT_HACK)

OK, now I understand the problem: For some obscure reason, Watcom uses a
different, non-standard calling convention for C's "exit" function
("watcall"
vs. "cdecl") than all other C runtimes. This leads to a mismatch in our
prototype and even more problems in classic GLUT.

I think doing this differently is a very, very bad idea from Watcom, so I'm
simply disabling the atexit hack for Watcom only, i.e. use the first fix you
proposed. The reason for fixing it this way is that we stay as close to
original GLUT as possible. I don't know e.g. is the atexit hack is necessary
for other development environments/runtimes, e.g. MinGW, so let's be
conservative...

Anyway, this was no show stopper, so where is our 2.6.0 release? :-(

Cheers,
   S.

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@...
https://lists.sourceforge.net/lists/listinfo/freeglut-developer

Parent Message unknown Re: Updated OpenWatcom support patch

by paul.blew :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

So attached is an updated patch for OpenWatcom support - is there anyone who
will apply it for me?

-----Original Message-----
From: Sven Panne [mailto:Sven.Panne@...]
Sent: Thursday, June 11, 2009 9:25 AM
To: Paul Blew; freeglut-developer@...
Subject: Re: [Freeglut-developer] Updated OpenWatcom support patch

Am Montag, 8. Juni 2009 09:30:44 schrieb paul.blew@...:

> The problem manifests itself as a compilation error (see attached).  
> It is complaining that the arguments for __glutInitWithExit do not
> match those in the prototype.
>
> It's been a while since I used classic GLUT, but I have a dim and
> distant memory that it was a problem there too. It seems that there is
> an assumption that if you are on Windows you must be using MSVC.
>
> A simple fix would be changing line 602 from:
>
> #if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
>
> to either:
>
> #if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) &&
> !defined(__WATCOMC__)
>
> or:
>
> #if defined(_MSC_VER) && !defined(GLUT_DISABLE_ATEXIT_HACK)
OK, now I understand the problem: For some obscure reason, Watcom uses a
different, non-standard calling convention for C's "exit" function
("watcall"
vs. "cdecl") than all other C runtimes. This leads to a mismatch in our
prototype and even more problems in classic GLUT.

I think doing this differently is a very, very bad idea from Watcom, so I'm
simply disabling the atexit hack for Watcom only, i.e. use the first fix you
proposed. The reason for fixing it this way is that we stay as close to
original GLUT as possible. I don't know e.g. is the atexit hack is necessary
for other development environments/runtimes, e.g. MinGW, so let's be
conservative...

Anyway, this was no show stopper, so where is our 2.6.0 release? :-(

Cheers,
   S.



------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@...
https://lists.sourceforge.net/lists/listinfo/freeglut-developer

freeglut_watcom.patch (25K) Download Attachment

Re: Updated OpenWatcom support patch

by Fay, John F Dr CTR USAF AFMC 46 SK :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

OK, I'm confused; I've been out of the loop for a while.  Do I put the
patch in?  It appears to be the deletion of a couple of files and the
addition of another one.

John F. Fay
Technical Fellow
Jacobs Technology TEAS Group
850-883-1294

-----Original Message-----
From: paul.blew@...
[mailto:paul.blew@...]
Sent: Thursday, June 11, 2009 3:35 AM
To: freeglut-developer@...
Subject: Re: [Freeglut-developer] Updated OpenWatcom support patch

So attached is an updated patch for OpenWatcom support - is there anyone
who will apply it for me?

-----Original Message-----
From: Sven Panne [mailto:Sven.Panne@...]
Sent: Thursday, June 11, 2009 9:25 AM
To: Paul Blew; freeglut-developer@...
Subject: Re: [Freeglut-developer] Updated OpenWatcom support patch

Am Montag, 8. Juni 2009 09:30:44 schrieb paul.blew@...:
> The problem manifests itself as a compilation error (see attached).  
> It is complaining that the arguments for __glutInitWithExit do not
> match those in the prototype.
>
> It's been a while since I used classic GLUT, but I have a dim and
> distant memory that it was a problem there too. It seems that there is

> an assumption that if you are on Windows you must be using MSVC.
>
> A simple fix would be changing line 602 from:
>
> #if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
>
> to either:
>
> #if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) &&
> !defined(__WATCOMC__)
>
> or:
>
> #if defined(_MSC_VER) && !defined(GLUT_DISABLE_ATEXIT_HACK)

OK, now I understand the problem: For some obscure reason, Watcom uses a
different, non-standard calling convention for C's "exit" function
("watcall"
vs. "cdecl") than all other C runtimes. This leads to a mismatch in our
prototype and even more problems in classic GLUT.

I think doing this differently is a very, very bad idea from Watcom, so
I'm simply disabling the atexit hack for Watcom only, i.e. use the first
fix you proposed. The reason for fixing it this way is that we stay as
close to original GLUT as possible. I don't know e.g. is the atexit hack
is necessary for other development environments/runtimes, e.g. MinGW, so
let's be conservative...

Anyway, this was no show stopper, so where is our 2.6.0 release? :-(

Cheers,
   S.


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@...
https://lists.sourceforge.net/lists/listinfo/freeglut-developer

Parent Message unknown Re: Updated OpenWatcom support patch

by paul.blew :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi John,

That's exactly what it is - replacement of the OpenWatcom IDE project files
(which never worked as they weren't in the right directory structure) with
Makefile.wat which allows building from the command line using wmake.

I appreciate that there may not be any other OW users on the list who can
verify this work, so even if the new makefile cannot be accepted, it would
be good if the broken project files could be removed (better no OW support
than broken OW support).

Regards,
Paul

-----Original Message-----
From: Fay, John F Dr CTR USAF AFMC 46 SK [mailto:john.fay.ctr@...]
Sent: Friday, June 12, 2009 8:36 PM
To: FreeGLUT developers list
Subject: Re: [Freeglut-developer] Updated OpenWatcom support patch

OK, I'm confused; I've been out of the loop for a while.  Do I put the patch
in?  It appears to be the deletion of a couple of files and the addition of
another one.

John F. Fay
Technical Fellow
Jacobs Technology TEAS Group
850-883-1294

-----Original Message-----
From: paul.blew@...
[mailto:paul.blew@...]
Sent: Thursday, June 11, 2009 3:35 AM
To: freeglut-developer@...
Subject: Re: [Freeglut-developer] Updated OpenWatcom support patch

So attached is an updated patch for OpenWatcom support - is there anyone who
will apply it for me?

-----Original Message-----
From: Sven Panne [mailto:Sven.Panne@...]
Sent: Thursday, June 11, 2009 9:25 AM
To: Paul Blew; freeglut-developer@...
Subject: Re: [Freeglut-developer] Updated OpenWatcom support patch

Am Montag, 8. Juni 2009 09:30:44 schrieb paul.blew@...:
> The problem manifests itself as a compilation error (see attached).  
> It is complaining that the arguments for __glutInitWithExit do not
> match those in the prototype.
>
> It's been a while since I used classic GLUT, but I have a dim and
> distant memory that it was a problem there too. It seems that there is

> an assumption that if you are on Windows you must be using MSVC.
>
> A simple fix would be changing line 602 from:
>
> #if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
>
> to either:
>
> #if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) &&
> !defined(__WATCOMC__)
>
> or:
>
> #if defined(_MSC_VER) && !defined(GLUT_DISABLE_ATEXIT_HACK)

OK, now I understand the problem: For some obscure reason, Watcom uses a
different, non-standard calling convention for C's "exit" function
("watcall"
vs. "cdecl") than all other C runtimes. This leads to a mismatch in our
prototype and even more problems in classic GLUT.

I think doing this differently is a very, very bad idea from Watcom, so I'm
simply disabling the atexit hack for Watcom only, i.e. use the first fix you
proposed. The reason for fixing it this way is that we stay as close to
original GLUT as possible. I don't know e.g. is the atexit hack is necessary
for other development environments/runtimes, e.g. MinGW, so let's be
conservative...

Anyway, this was no show stopper, so where is our 2.6.0 release? :-(

Cheers,
   S.


----------------------------------------------------------------------------
--
Crystal Reports - New Free Runtime and 30 Day Trial Check out the new
simplified licensing option that enables unlimited royalty-free distribution
of the report engine for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@...
https://lists.sourceforge.net/lists/listinfo/freeglut-developer

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@...
https://lists.sourceforge.net/lists/listinfo/freeglut-developer

Re: Updated OpenWatcom support patch

by Fay, John F Dr CTR USAF AFMC 46 SK :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

OK, better late than never.  Please let me know if I've put the changes
in correctly.

John F. Fay
Technical Fellow
Jacobs Technology TEAS Group
850-883-1294

-----Original Message-----
From: paul.blew@...
[mailto:paul.blew@...]
Sent: Thursday, June 11, 2009 3:35 AM
To: freeglut-developer@...
Subject: Re: [Freeglut-developer] Updated OpenWatcom support patch

So attached is an updated patch for OpenWatcom support - is there anyone
who will apply it for me?

-----Original Message-----
From: Sven Panne [mailto:Sven.Panne@...]
Sent: Thursday, June 11, 2009 9:25 AM
To: Paul Blew; freeglut-developer@...
Subject: Re: [Freeglut-developer] Updated OpenWatcom support patch

Am Montag, 8. Juni 2009 09:30:44 schrieb paul.blew@...:
> The problem manifests itself as a compilation error (see attached).  
> It is complaining that the arguments for __glutInitWithExit do not
> match those in the prototype.
>
> It's been a while since I used classic GLUT, but I have a dim and
> distant memory that it was a problem there too. It seems that there is

> an assumption that if you are on Windows you must be using MSVC.
>
> A simple fix would be changing line 602 from:
>
> #if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
>
> to either:
>
> #if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) &&
> !defined(__WATCOMC__)
>
> or:
>
> #if defined(_MSC_VER) && !defined(GLUT_DISABLE_ATEXIT_HACK)

OK, now I understand the problem: For some obscure reason, Watcom uses a
different, non-standard calling convention for C's "exit" function
("watcall"
vs. "cdecl") than all other C runtimes. This leads to a mismatch in our
prototype and even more problems in classic GLUT.

I think doing this differently is a very, very bad idea from Watcom, so
I'm simply disabling the atexit hack for Watcom only, i.e. use the first
fix you proposed. The reason for fixing it this way is that we stay as
close to original GLUT as possible. I don't know e.g. is the atexit hack
is necessary for other development environments/runtimes, e.g. MinGW, so
let's be conservative...

Anyway, this was no show stopper, so where is our 2.6.0 release? :-(

Cheers,
   S.


------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@...
https://lists.sourceforge.net/lists/listinfo/freeglut-developer

Parent Message unknown Re: Updated OpenWatcom support patch

by paul.blew :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Spot on. Thanks.

-----Original Message-----
From: Fay, John F Dr CTR USAF AFMC 46 SK [mailto:john.fay.ctr@...]
Sent: Monday, June 22, 2009 7:55 PM
To: FreeGLUT developers list
Subject: Re: [Freeglut-developer] Updated OpenWatcom support patch

OK, better late than never.  Please let me know if I've put the changes in
correctly.

John F. Fay
Technical Fellow
Jacobs Technology TEAS Group
850-883-1294

-----Original Message-----
From: paul.blew@...
[mailto:paul.blew@...]
Sent: Thursday, June 11, 2009 3:35 AM
To: freeglut-developer@...
Subject: Re: [Freeglut-developer] Updated OpenWatcom support patch

So attached is an updated patch for OpenWatcom support - is there anyone who
will apply it for me?

-----Original Message-----
From: Sven Panne [mailto:Sven.Panne@...]
Sent: Thursday, June 11, 2009 9:25 AM
To: Paul Blew; freeglut-developer@...
Subject: Re: [Freeglut-developer] Updated OpenWatcom support patch

Am Montag, 8. Juni 2009 09:30:44 schrieb paul.blew@...:
> The problem manifests itself as a compilation error (see attached).  
> It is complaining that the arguments for __glutInitWithExit do not
> match those in the prototype.
>
> It's been a while since I used classic GLUT, but I have a dim and
> distant memory that it was a problem there too. It seems that there is

> an assumption that if you are on Windows you must be using MSVC.
>
> A simple fix would be changing line 602 from:
>
> #if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
>
> to either:
>
> #if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) &&
> !defined(__WATCOMC__)
>
> or:
>
> #if defined(_MSC_VER) && !defined(GLUT_DISABLE_ATEXIT_HACK)

OK, now I understand the problem: For some obscure reason, Watcom uses a
different, non-standard calling convention for C's "exit" function
("watcall"
vs. "cdecl") than all other C runtimes. This leads to a mismatch in our
prototype and even more problems in classic GLUT.

I think doing this differently is a very, very bad idea from Watcom, so I'm
simply disabling the atexit hack for Watcom only, i.e. use the first fix you
proposed. The reason for fixing it this way is that we stay as close to
original GLUT as possible. I don't know e.g. is the atexit hack is necessary
for other development environments/runtimes, e.g. MinGW, so let's be
conservative...

Anyway, this was no show stopper, so where is our 2.6.0 release? :-(

Cheers,
   S.


----------------------------------------------------------------------------
--
Are you an open source citizen? Join us for the Open Source Bridge
conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference:
$250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.o
rg
_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@...
https://lists.sourceforge.net/lists/listinfo/freeglut-developer

------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@...
https://lists.sourceforge.net/lists/listinfo/freeglut-developer