return -1;
}
+#ifndef PERL_OBJECT
+
static UINT timerid = 0;
static VOID CALLBACK TimerProc(HWND win, UINT msg, UINT id, DWORD time)
timerid=0;
sighandler(14);
}
+#endif /* !PERL_OBJECT */
DllExport unsigned int
win32_alarm(unsigned int sec)
{
+#ifndef PERL_OBJECT
/*
* the 'obvious' implentation is SetTimer() with a callback
* which does whatever receiving SIGALRM would do
timerid=0;
}
}
+#endif /* !PERL_OBJECT */
return 0;
}
#ifdef USE_FIXED_OSFHANDLE
#define FOPEN 0x01 /* file handle open */
+#define FNOINHERIT 0x10 /* file handle opened O_NOINHERIT */
#define FAPPEND 0x20 /* file handle opened O_APPEND */
#define FDEV 0x40 /* file handle refers to device */
#define FTEXT 0x80 /* file handle is in text mode */
/* create an ioinfo entry, kill its handle, and steal the entry */
-static int _alloc_osfhnd()
+static int
+_alloc_osfhnd(void)
{
HANDLE hF = CreateFile("NUL", 0, 0, NULL, OPEN_ALWAYS, 0, NULL);
int fh = _open_osfhandle((long)hF, 0);
if (flags & O_TEXT)
fileflags |= FTEXT;
+ if (flags & O_NOINHERIT)
+ fileflags |= FNOINHERIT;
+
/* attempt to allocate a C Runtime file handle */
if ((fh = _alloc_osfhnd()) == -1) {
errno = EMFILE; /* too many open files */
WCHAR wNewName[MAX_PATH+1];
if (IsWin95())
- Perl_die(aTHX_ PL_no_func, "link");
+ Perl_croak(aTHX_ PL_no_func, "link");
pfnCreateHardLinkW =
(BOOL (__stdcall *)(LPCWSTR, LPCWSTR, LPSECURITY_ATTRIBUTES))
#define FTEXT 0x80 /* file handle is in text mode */
#define MAX_DESCRIPTOR_COUNT (64*32) /* this is the maximun that MSVCRT can handle */
-int __cdecl _fixed_read(int fh, void *buf, unsigned cnt)
+int __cdecl
+_fixed_read(int fh, void *buf, unsigned cnt)
{
int bytes_read; /* number of bytes read */
char *buffer; /* buffer to read to */