* and dirent.h as taking pointers to differently typed opaque
* structures.
*/
- Direntry_t *(*readdirfunc)();
+ Direntry_t *(*readdirfunc)(DIR*);
*pathend = BG_EOS;
errno = 0;
MAGIC *
Perl_mg_dup(pTHX_ MAGIC *mg)
{
- MAGIC *mgret = (MAGIC*)NULL;
- MAGIC *mgprev;
+ MAGIC *mgprev = (MAGIC*)NULL;
+ MAGIC *mgret;
if (!mg)
return (MAGIC*)NULL;
/* look for it in the table first */
for (; mg; mg = mg->mg_moremagic) {
MAGIC *nmg;
Newz(0, nmg, 1, MAGIC);
- if (!mgret)
- mgret = nmg;
- else
+ if (mgprev)
mgprev->mg_moremagic = nmg;
+ else
+ mgret = nmg;
nmg->mg_virtual = mg->mg_virtual; /* XXX copy dynamic vtable? */
nmg->mg_private = mg->mg_private;
nmg->mg_type = mg->mg_type;
(void)PerlIO_seek(PL_rsfp, 0L, 0);
}
if (PerlLIO_setmode(PerlIO_fileno(PL_rsfp), O_TEXT) != -1) {
+ /* XXX see note in do_binmode() */
+ ((FILE*)PL_rsfp)->flags &= ~_F_BIN;
if (loc > 0)
PerlIO_seek(PL_rsfp, loc, 0);
}
#define UTF_CONTINUATION_MARK 0x80
#define UTF_ACCUMULATION_SHIFT 6
#define UTF_CONTINUATION_MASK ((U8)0x3f)
-#define UTF8_ACCUMULATE(old, new) ((old) << UTF_ACCUMULATION_SHIFT | (((U8)new) & UTF_CONTINUATION_MASK))
+#define UTF8_ACCUMULATE(old, new) (((old) << UTF_ACCUMULATION_SHIFT) | (((U8)new) & UTF_CONTINUATION_MASK))
#define UTF8_EIGHT_BIT_HI(c) ((((U8)(c))>>UTF_ACCUMULATION_SHIFT)|UTF_START_MARK(2))
#define UTF8_EIGHT_BIT_LO(c) (((((U8)(c)))&UTF_CONTINUATION_MASK)|UTF_CONTINUATION_MARK)
# Options
#
INCLUDES = -I$(COREDIR) -I.\include -I. -I.. -I"$(CCINCDIR)"
-#PCHFLAGS = -H -Hc -H=c:\temp\bcmoduls.pch
-DEFINES = -DWIN32 -D_MT $(CRYPT_FLAG)
+#PCHFLAGS = -H -Hc -H=c:\temp\bcmoduls.pch
+DEFINES = -DWIN32 $(CRYPT_FLAG)
LOCDEFS = -DPERLDLL -DPERL_CORE
SUBSYS = console
CXX_FLAG = -P
LIBOUT_FLAG =
.IF "$(BCCOLD)" != "define"
LINK_FLAGS += -Gn
+DEFINES += -D_MT
.END
.IF "$(BCCVCL)" == "define"
LIBC = cp32mti.lib vcl.lib vcl50.lib vclx50.lib vcle50.lib
#ifdef __BORLANDC__ /* Borland C++ */
+#if (__BORLANDC__ <= 0x520)
#define _access access
#define _chdir chdir
+#endif
+
#define _getpid getpid
#define wcsicmp _wcsicmp
#include <sys/types.h>
#pragma warn -aus /* "'foo' is assigned a value that is never used" */
#pragma warn -use /* "'foo' is declared but never used" */
#pragma warn -csu /* "comparing signed and unsigned values" */
-#pragma warn -pro /* "call to function with no prototype" */
-#pragma warn -stu /* "undefined structure 'foo'" */
/* Borland is picky about a bare member function name used as its ptr */
#ifdef PERL_OBJECT
#define init_os_extras Perl_init_os_extras
DllExport void Perl_win32_init(int *argcp, char ***argvp);
-DllExport void Perl_init_os_extras();
+DllExport void Perl_init_os_extras(void);
DllExport void win32_str_os_error(void *sv, DWORD err);
DllExport int RunPerl(int argc, char **argv, char **env);