Mail Archives: djgpp-workers/2000/08/22/08:41:49
Actually I've finished integrating my patch, now I'm browsing
through libc souces and looking for anything unhandled. One
thing I've found that _dxe_load is using _open(). IMHO open()
does better with symlinks. Change tested, it works.
Any comments?
Laurynas
Index: dxeload.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/dxe/dxeload.c,v
retrieving revision 1.2
diff -u -r1.2 dxeload.c
--- dxeload.c 1996/04/26 18:52:54 1.2
+++ dxeload.c 2000/08/22 12:39:48
@@ -2,10 +2,12 @@
This software may be freely distributed with above copyright, no warranty.
Based on code by DJ Delorie, it's really his, enhanced, bugs fixed. */
+#include <fcntl.h>
#include <io.h>
#include <stdlib.h>
#include <errno.h>
#include <sys/dxe.h>
+#include <sys/stat.h>
void *_dxe_load(char *name)
{
@@ -13,7 +15,7 @@
char *data;
int h;
- h = _open(name, 0);
+ h = open(name, O_RDONLY);
if (h < 0)
return 0;
_read(h, &dh, sizeof(dh));
- Raw text -