From: Sam S. <sd...@gn...> - 2011-07-26 16:20:35
|
Yaroslav, do you have these system headers: #include <winternl.h> #include <ntstatus.h> if yes, do they declare CoGetCurrentProcess? how about <setjmp.h>? what happens when you remove -#elif defined(__MINGW32__) - /* on mingw: - _CRTIMP int __cdecl __MINGW_NOTHROW _setjmp (jmp_buf); - #define setjmp(x) _setjmp(x) - _CRTIMP void __cdecl __MINGW_NOTHROW longjmp (jmp_buf, int) __MINGW_ATTRIB_NORETURN; - so we only need to redefine setjmp, not longjmp. - this is actually only necessary for lightning, see - http://article.gmane.org/gmane.lisp.clisp.devel:18315 - http://lists.gnu.org/archive/html/lightning/2008-05/msg00015.html */ - #undef setjmp - #define setjmp _setjmp from lispbibl.d? (I had to!) What does the appended patch do to your build? Thanks! -- Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 11.0.60900031 http://www.memritv.org http://iris.org.il http://jihadwatch.org http://palestinefacts.org http://thereligionofpeace.com http://dhimmi.com Press any key to continue or any other key to quit. diff -r 72dfd22cafec src/lispbibl.d --- a/src/lispbibl.d Tue Jul 26 10:49:16 2011 -0400 +++ b/src/lispbibl.d Tue Jul 26 12:20:01 2011 -0400 @@ -1315,17 +1315,6 @@ typedef signed int signean; #undef longjmp #define longjmp(x,y) (_longjmp(x,y), NOTREACHED) #endif -#elif defined(__MINGW32__) - /* on mingw: - _CRTIMP int __cdecl __MINGW_NOTHROW _setjmp (jmp_buf); - #define setjmp(x) _setjmp(x) - _CRTIMP void __cdecl __MINGW_NOTHROW longjmp (jmp_buf, int) __MINGW_ATTRIB_NORETURN; - so we only need to redefine setjmp, not longjmp. - this is actually only necessary for lightning, see - http://article.gmane.org/gmane.lisp.clisp.devel:18315 - http://lists.gnu.org/archive/html/lightning/2008-05/msg00015.html */ - #undef setjmp - #define setjmp _setjmp #endif /* A longjmp() can only be called using an `int'. But if we want to use a `long' and if sizeof(int) < sizeof(long), diff -r 72dfd22cafec src/stream.d --- a/src/stream.d Tue Jul 26 10:49:16 2011 -0400 +++ b/src/stream.d Tue Jul 26 12:20:01 2011 -0400 @@ -14914,7 +14914,6 @@ LISPFUNN(socket_stream_shutdown,2) { #if defined(WIN32_NATIVE) /* http://msdn.microsoft.com/en-us/library/ms804359.aspx */ -#include <ddk/ntifs.h> typedef NTSTATUS (__stdcall *QueryInformationFile_t) (IN HANDLE FileHandle, OUT PIO_STATUS_BLOCK IoStatusBlock, OUT PVOID FileInformation, IN ULONG Length, diff -r 72dfd22cafec src/win32.d --- a/src/win32.d Tue Jul 26 10:49:16 2011 -0400 +++ b/src/win32.d Tue Jul 26 12:20:01 2011 -0400 @@ -36,6 +36,8 @@ /* Table of system error messages */ #include <winerror.h> +#include <winternl.h> +#include <ntstatus.h> /* extern DWORD GetLastError (void); extern void SetLastError (DWORD ErrCode); extern DWORD FormatMessage (DWORD Flags, LPCVOID Source, DWORD MessageId, DWORD LanguageId, LPTSTR Buffer, DWORD Size, va_list* Arguments); @@ -54,7 +56,7 @@ extern void free (void* memblock); /* used by spvw.d */ /* Normal program exit */ -extern _Noreturn void _exit (int status); +/*extern _Noreturn void _exit (int status);*/ /* used by spvw.d */ /* Abrupt program termination */ @@ -139,7 +141,7 @@ struct file_id { /* Unique ID for DWORD nFileIndexHigh; DWORD nFileIndexLow; }; -typedef DWORD errno_t; +/*typedef DWORD errno_t;*/ /* fill FI for an exiting namestring */ extern errno_t namestring_file_id (char *namestring, struct file_id *fi); /* fill FI for an existing file handle */ @@ -216,6 +218,7 @@ extern ssize_t fd_write (HANDLE fd, cons #define SIZEOF_OFF_T 8 #ifdef __MINGW32__ #include <io.h> + #undef lseek #define lseek clisp_lseek /* avoid collision with prototype in <mingw/io.h> */ #endif extern off_t lseek (HANDLE fd, off_t offset, DWORD mode); @@ -337,17 +340,6 @@ extern BOOL MyCreateProcess (LPTSTR Comm LPPROCESS_INFORMATION ProcessInformation); /* used by pathname.d, stream.d */ -/* Getting "random" numbers */ -#if defined(__MINGW32__) -/* Not defined in any header. */ -extern STDCALL DWORD CoGetCurrentProcess (void); -#else - #include <objbase.h> -/* extern DWORD CoGetCurrentProcess (void); */ -#endif -/* used by lisparit.d - requires linking with ole32.lib */ - /* Getting more information about the machine. extern LONG RegOpenKeyEx (HKEY Key, LPCTSTR SubKey, DWORD Options, REGSAM Desired, PHKEY Result); extern LONG RegQueryValueEx (HKEY Key, LPTSTR ValueName, LPDWORD Reserved, LPDWORD Type, LPBYTE Data, LPDWORD cbData); |