[Freedos-kernel] Error compiling ...

2009-02-15 Thread George Petculescu
Hello,

I have a problem while compiling FreeDOS Kernel.
I use latest version of Open Watcom and NASM 0.98. I recive the next error:

Process BOOT +++


Process SYS 

wcc -Ic:\watcom\H -I..\hdr -DFORSYS -DWITHFAT32 -zq-zp1-os-s-we-e3-wx sys.c
sys.c(1050): Warning! E1176: Parameter 2, pointer type mismatch
sys.c(1050): Note! I2003: source conversion type is 'unsigned short *'
sys.c(1050): Note! I2004: target conversion type is 'unsigned int *'
sys.c(1050): Note! I2002: '_dos_allocmem' defined in: c:\watcom\H\dos.h(161)
sys.c(1079): Warning! E1176: Parameter 2, pointer type mismatch
sys.c(1079): Note! I2003: source conversion type is 'unsigned short *'
sys.c(1079): Note! I2004: target conversion type is 'unsigned int *'
sys.c(1079): Warning! E1176: Parameter 3, pointer type mismatch
sys.c(1079): Note! I2003: source conversion type is 'unsigned short *'
sys.c(1079): Note! I2004: target conversion type is 'unsigned int *'
sys.c(1079): Note! I2002: '_dos_getftime' defined in: c:\watcom\H\dos.h(188)
Error(E42): Last command making (sys.obj) returned a bad status
Error(E02): Make execution terminated
Compilation was aborted!

What is the problem ? Should I wrong something in config.bat file ?
Thanks,
George.
--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H___
Freedos-kernel mailing list
Freedos-kernel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-kernel


Re: [Freedos-kernel] Error compiling - SYS.C OpenWatcom version differences

2009-02-15 Thread Eric Auer
Hi Hans,

 The easy fix to this is use Watcom 1.2. 

The current versions are 1.7 and 1.8 release candidate,
where and why would one download a years-old OW 1.2...?
I must say that the kernel compiled well with OW 1.3 of
2004, but I wonder whether newer versions work better.

 I use latest version of Open Watcom and NASM 0.98

   sys.c(1050): Warning! E1176: Parameter 2, pointer type mismatch
   sys.c(1050): Note! I2003: source conversion type is 'unsigned short *'
   sys.c(1050): Note! I2004: target conversion type is 'unsigned int *'
   sys.c(1050): Note! I2002: '_dos_allocmem' defined in: c:\watcom\H\dos.h(161)

   1046   /* allocate dos memory */
   1047 #ifdef __TURBOC__
   1048   if (allocmem((unsigned)((*filesize+15)4), theseg)!=-1)
   1049 #else
   1050   if (_dos_allocmem((unsigned)((*filesize+15)4), theseg)!=0)
   1051 #endif
   1052   {
   1053 printf(Not enough memory...

The filesize variable is a pointer to unsigned 32 bit integere here.
The theseg variable is unsigned 16 bit integer here. Which versions
of OpenWatcom expect which _dos_allocmem parameter types? It seems
plausible to use 16 bit segments if you ask me...

Do both OpenWatcom 1.7 and 1.8 complain? Maybe a regression?

   sys.c(1079): Warning! E1176: Parameter 2, pointer type mismatch
   sys.c(1079): Note! I2003: source conversion type is 'unsigned short *'
   sys.c(1079): Note! I2004: target conversion type is 'unsigned int *'

   sys.c(1079): Warning! E1176: Parameter 3, pointer type mismatch
   sys.c(1079): Note! I2003: source conversion type is 'unsigned short *'
   sys.c(1079): Note! I2004: target conversion type is 'unsigned int *'
   sys.c(1079): Note! I2002: '_dos_getftime' defined in: c:\watcom\H\dos.h(188)

   1078 #if defined __WATCOMC__ || defined _MSC_VER
   1079   _dos_getftime(fdin, filetime-date, filetime-time);
   1080 #elif defined __TURBOC__
   1081   getftime(fdin, filetime);
   1082 #endif

This is related to:

160 #ifdef __TURBOC__
161 typedef struct ftime ftime;
162 #else
163 typedef struct
164 {
165   unsigned short date, time;
166 } ftime;
167 #endif

It seems newer OpenWatcom versions like using int a lot, but why?
Since when is this the case? Do you know a macro for making the
line 165 depend on the version of OpenWatcom? Or maybe better, is
there a header file which makes using _dos_getftime / _dos_setftime
easier, if possible version independent in OpenWatcom?

Eric





--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Freedos-kernel mailing list
Freedos-kernel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-kernel