#define do_undump (Perl_Vars.Gdo_undump)
#define egid (Perl_Vars.Gegid)
#define error_count (Perl_Vars.Gerror_count)
-#define error_no (Perl_Vars.Gerror_no)
#define euid (Perl_Vars.Geuid)
#define eval_cond (Perl_Vars.Geval_cond)
#define eval_mutex (Perl_Vars.Geval_mutex)
#define Gdo_undump do_undump
#define Gegid egid
#define Gerror_count error_count
-#define Gerror_no error_no
#define Geuid euid
#define Geval_cond eval_cond
#define Geval_mutex eval_mutex
#define do_undump Perl_do_undump
#define egid Perl_egid
#define error_count Perl_error_count
-#define error_no Perl_error_no
#define euid Perl_euid
#define eval_cond Perl_eval_cond
#define eval_mutex Perl_eval_mutex
int&
CPerlObj::ErrorNo(void)
{
- return error_no;
+ return errno;
}
void
PERLVAR(Gcurthr, struct perl_thread *) /* Currently executing (fake) thread */
#endif
#endif /* USE_THREADS */
-#ifdef PERL_OBJECT
-#ifdef WIN32
-PERLVAR(Gerror_no, int) /* errno for each interpreter */
-#endif
-#endif
PERLVAR(Guid, int) /* current real user id */
PERLVAR(Geuid, int) /* current effective user id */
Perl_dump_pm
Perl_dump_sub
Perl_expectterm
-Perl_error_no
Perl_extralen
Perl_fetch_gv
Perl_fetch_io
#include <ipproc.h>
#include <ipstdio.h>
+#define CALLFUNC0RET(x)\
+ int ret = x;\
+ if(ret < 0)\
+ err = errno;\
+ return ret;
+
extern int g_closedir(DIR *dirp);
extern DIR *g_opendir(char *filename);
extern struct direct *g_readdir(DIR *dirp);
CPerlDir() {};
virtual int Makedir(const char *dirname, int mode, int &err)
{
- return win32_mkdir(dirname, mode);
+ CALLFUNC0RET(win32_mkdir(dirname, mode));
};
virtual int Chdir(const char *dirname, int &err)
{
- return win32_chdir(dirname);
+ CALLFUNC0RET(win32_chdir(dirname));
};
virtual int Rmdir(const char *dirname, int &err)
{
- return win32_rmdir(dirname);
+ CALLFUNC0RET(win32_rmdir(dirname));
};
virtual int Close(DIR *dirp, int &err)
{