Mail Archives: djgpp-workers/2008/04/07/07:05:56
Some time ago, in:
http://www.delorie.com/archives/browse.cgi?p=djgpp-workers/2008/03/26/14:39:31
Ozkan Sezer submitted a patch to fix warnings during compilation of
ioctl.c and fcntl.c. I have also fixed the example given in fsext.txh
that verbatim reproduced the offending code of ioctl.c and fcntl.c.
It is worth to be noticed that the macro __FSEXT_func_wrapper used
to fix these issues is no where documented. Due to my limited knowledge
about FSE and my limited english skills I will not write such documentation
from scratch. It would be nice if some one else could contribute a small
documentation about this macro.
Regards,
Juan M. Guerrero
2008-04-07 Juan Manuell Guerrero <juan DOT guerrero AT gmx DOT de>
* src/libc/compat/ioctl/ioctl.c: Use __FSEXT_func_wrapper instead of
calling functions directly with wrong type of arguments.
Patch by Ozkan Sezer, 2008-03-26.
* src/libc/posix/fcntl/fcntl.c: Use __FSEXT_func_wrapper instead of
calling functions directly with wrong type of arguments.
Patch by Ozkan Sezer, 2008-03-26.
* src/libc/fsext/fsext.txh: Fix example.
Index: src/libc/compat/ioctl/ioctl.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/compat/ioctl/ioctl.c,v
retrieving revision 1.7
diff -U3 -r1.7 ioctl.c
--- src/libc/compat/ioctl/ioctl.c 10 May 2003 15:26:11 -0000 1.7
+++ src/libc/compat/ioctl/ioctl.c 7 Apr 2008 11:01:58 -0000
@@ -120,6 +120,7 @@
#include <stdarg.h>
#include <stdlib.h>
#include <sys/fsext.h>
+#include <libc/fsexthlp.h>
#include <sys/ioctl.h>
#include <libc/farptrgs.h>
@@ -266,7 +267,7 @@
if(func)
{
int rv;
- if (func(__FSEXT_ioctl,&rv, &fd))
+ if (__FSEXT_func_wrapper(func, __FSEXT_ioctl, &rv, fd))
return rv;
}
@@ -322,7 +323,7 @@
** see if this is a file system extension file
**
*/
- if (func && func(__FSEXT_ioctl, &rv, &fd))
+ if (func && __FSEXT_func_wrapper(func, __FSEXT_ioctl, &rv, fd))
return rv;
va_start(args, cmd);
Index: src/libc/fsext/fsext.txh
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/fsext/fsext.txh,v
retrieving revision 1.20
diff -U3 -r1.20 fsext.txh
--- src/libc/fsext/fsext.txh 1 Apr 2003 20:47:28 -0000 1.20
+++ src/libc/fsext/fsext.txh 7 Apr 2008 11:02:03 -0000
@@ -396,7 +396,7 @@
if (func)
@{
int rv;
- if (func(__FSEXT_read, &rv, &fd))
+ if (__FSEXT_func_wrapper(func, __FSEXT_read, &rv, fd))
return rv;
@}
/* rest of read() */
Index: src/libc/posix/fcntl/fcntl.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/posix/fcntl/fcntl.c,v
retrieving revision 1.9
diff -U3 -r1.9 fcntl.c
--- src/libc/posix/fcntl/fcntl.c 26 Mar 2003 19:42:27 -0000 1.9
+++ src/libc/posix/fcntl/fcntl.c 7 Apr 2008 11:02:03 -0000
@@ -12,6 +12,7 @@
#include <fcntl.h>
#include <io.h>
#include <sys/fsext.h>
+#include <libc/fsexthlp.h>
#include <sys/movedata.h>
#include <libc/farptrgs.h>
#include <libc/dosio.h>
@@ -274,7 +275,7 @@
if (func)
{
int rv;
- if (func(__FSEXT_fcntl, &rv, &fd))
+ if (__FSEXT_func_wrapper(func, __FSEXT_fcntl, &rv, fd))
return rv;
}
- Raw text -