Re: [Freedos-kernel] bug: talloc.c

2004-05-10 Thread Arkady V.Belousov
Hi!

10-Май-2004 16:34 [EMAIL PROTECTED] (Bart Oldeman) wrote to
[EMAIL PROTECTED]:

>> Turbo C  Version 2.01  Copyright (c) 1987, 1988 Borland International
>> Error talloc.c 21: Type mismatch in redeclaration of '__brklvl'
BO> Strange, I don't see this. Where is __brklvl defined for your Turbo C?

 Nowhere (inside RTL, to be precise). But this variable used for stack
overflow check, whereas turboc.cfg in my TC edition doesn't turns off this
check (no -N-). As I understand, this is reason why TC "knows" type of
__brklvl. And this is another reason, why better to include turboc.cfg into
all directories (or use "+..\mkfiles\turboc.cfg" option).

BO> As for your other patches, they take a lot of time to digest for the
BO> reasons I gave you already, so be patient.




---
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
___
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel


Re: [Freedos-kernel] bug: talloc.c

2004-05-10 Thread Bart Oldeman
On Mon, 10 May 2004, Arkady V.Belousov wrote:

> __O\_/_\_/O__
> d:\lang\tc\tcc -c -Id:\lang\tc\include -I..\hdr -DFORSYS -DWITHFAT32 
> -Ld:\lang\tc\lib -mt -a- -k- -f- -ff- -O -Z -d talloc.c
> Turbo C  Version 2.01  Copyright (c) 1987, 1988 Borland International
> talloc.c:
> Error talloc.c 21: Type mismatch in redeclaration of '__brklvl'
> Warning talloc.c 66: Non-portable pointer assignment in function malloc
> Warning talloc.c 80: Non-portable pointer assignment in function malloc
> _
>   O/~\ /~\O

Strange, I don't see this. Where is __brklvl defined for your Turbo C?

As for your other patches, they take a lot of time to digest for the
reasons I gave you already, so be patient.

Bart



---
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
___
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel


[Freedos-kernel] bug: talloc.c

2004-05-10 Thread Arkady V.Belousov
Hi!

__O\_/_\_/O__
d:\lang\tc\tcc -c -Id:\lang\tc\include -I..\hdr -DFORSYS -DWITHFAT32 
-Ld:\lang\tc\lib -mt -a- -k- -f- -ff- -O -Z -d talloc.c
Turbo C  Version 2.01  Copyright (c) 1987, 1988 Borland International
talloc.c:
Error talloc.c 21: Type mismatch in redeclaration of '__brklvl'
Warning talloc.c 66: Non-portable pointer assignment in function malloc
Warning talloc.c 80: Non-portable pointer assignment in function malloc
_
  O/~\ /~\O

Patch:

__O\_/_\_/O__
diff -ruNp old/sys/talloc.c new/sys/talloc.c
--- old/sys/talloc.c2004-03-17 14:06:50.0 +
+++ new/sys/talloc.c2004-05-10 18:59:24.0 +
@@ -18,12 +18,12 @@
 #include 

 #ifdef __TURBOC__
-extern void *__brklvl;
-#define sbrk(x) __brklvl
+extern unsigned __brklvl;
+#define sbrk(x) ((void*)__brklvl)
 #define brk(newbrk) \
(((char *)(newbrk) > (char *)(&length) - 0x200) ? \
-1 : \
-   (__brklvl = (newbrk), 0))
+   (__brklvl = (unsigned)(newbrk), 0))
 #endif

 #ifdef __WATCOMC__
_
  O/~\ /~\O

PS: I not found this bug earlier, because I was compile my own edition of
SYS.




---
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
___
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel