From: ol.sc
Date: Sat, 17 Jul 2010 19:13:07 +0000 (+0000)
Subject: Made use of the new common __directerrno and __mappederrno function.
X-Git-Tag: V2.13.3~686
X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f15910e5f185feb467ad1ed4e4096da3ccc89b36;p=cc65
Made use of the new common __directerrno and __mappederrno function.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4749 b7a2c559-68d2-44c3-8de9-860c34a00d81
---
diff --git a/libsrc/apple2/opendir.c b/libsrc/apple2/opendir.c
index ad415705a..98fd4a348 100644
--- a/libsrc/apple2/opendir.c
+++ b/libsrc/apple2/opendir.c
@@ -65,7 +65,7 @@ DIR* __fastcall__ opendir (register const char* name)
if ((dir = malloc (sizeof (*dir))) == NULL) {
/* May not have been done by malloc() */
- errno = ENOMEM;
+ _directerrno (ENOMEM);
/* Return failure */
return NULL;
@@ -96,8 +96,8 @@ DIR* __fastcall__ opendir (register const char* name)
}
/* EOF: Most probably no directory file at all */
- if (errno == 0) {
- errno = EINVAL;
+ if (_oserror == 0) {
+ _directerrno (EINVAL);
}
/* Cleanup directory file */