mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Rationalized MS ifdefs
This commit is contained in:
parent
d4ab3cde8e
commit
9b38a145e2
3 changed files with 10 additions and 18 deletions
|
@ -38,8 +38,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
USE_DL -- Jack's dl for IRIX 4 or GNU dld with emulation for Jack's dl
|
USE_DL -- Jack's dl for IRIX 4 or GNU dld with emulation for Jack's dl
|
||||||
USE_SHLIB -- SunOS or IRIX 5 (SVR4?) shared libraries
|
USE_SHLIB -- SunOS or IRIX 5 (SVR4?) shared libraries
|
||||||
_AIX -- AIX style dynamic linking
|
_AIX -- AIX style dynamic linking
|
||||||
NT -- NT style dynamic linking (using DLLs)
|
MS_WIN32 -- Windows NT style dynamic linking (using DLLs)
|
||||||
WIN16_DL -- Windows 16-bit dynamic linking (using DLLs)
|
MS_WIN16 -- Windows 16-bit dynamic linking (using DLLs)
|
||||||
_DL_FUNCPTR_DEFINED -- if the typedef dl_funcptr has been defined
|
_DL_FUNCPTR_DEFINED -- if the typedef dl_funcptr has been defined
|
||||||
USE_MAC_DYNAMIC_LOADING -- Mac CFM shared libraries
|
USE_MAC_DYNAMIC_LOADING -- Mac CFM shared libraries
|
||||||
SHORT_EXT -- short extension for dynamic module, e.g. ".so"
|
SHORT_EXT -- short extension for dynamic module, e.g. ".so"
|
||||||
|
@ -76,15 +76,7 @@ typedef void (*dl_funcptr)();
|
||||||
#define dlerror() "error in dynamic linking"
|
#define dlerror() "error in dynamic linking"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __WIN32__
|
#ifdef MS_WINDOWS /* i.e. MS_WIN32 or MS_WIN16 */
|
||||||
#define NT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef MS_WIN16
|
|
||||||
#define WIN16_DL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(NT) || defined(WIN16_DL)
|
|
||||||
#define DYNAMIC_LINK
|
#define DYNAMIC_LINK
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
typedef FARPROC dl_funcptr;
|
typedef FARPROC dl_funcptr;
|
||||||
|
@ -382,7 +374,7 @@ load_dynamic_module(name, pathname, fp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* _AIX */
|
#endif /* _AIX */
|
||||||
#ifdef NT
|
#ifdef MS_WIN32
|
||||||
{
|
{
|
||||||
HINSTANCE hDLL;
|
HINSTANCE hDLL;
|
||||||
hDLL = LoadLibrary(pathname);
|
hDLL = LoadLibrary(pathname);
|
||||||
|
@ -424,8 +416,8 @@ load_dynamic_module(name, pathname, fp)
|
||||||
}
|
}
|
||||||
p = GetProcAddress(hDLL, funcname);
|
p = GetProcAddress(hDLL, funcname);
|
||||||
}
|
}
|
||||||
#endif /* NT */
|
#endif /* MS_WIN32 */
|
||||||
#ifdef WIN16_DL
|
#ifdef MS_WIN16
|
||||||
{
|
{
|
||||||
HINSTANCE hDLL;
|
HINSTANCE hDLL;
|
||||||
hDLL = LoadLibrary(pathname);
|
hDLL = LoadLibrary(pathname);
|
||||||
|
@ -437,7 +429,7 @@ load_dynamic_module(name, pathname, fp)
|
||||||
}
|
}
|
||||||
p = GetProcAddress(hDLL, funcname);
|
p = GetProcAddress(hDLL, funcname);
|
||||||
}
|
}
|
||||||
#endif /* WIN16_DL */
|
#endif /* MS_WIN16 */
|
||||||
#ifdef USE_DL
|
#ifdef USE_DL
|
||||||
p = dl_loadmod(getprogramname(), pathname, funcname);
|
p = dl_loadmod(getprogramname(), pathname, funcname);
|
||||||
#endif /* USE_DL */
|
#endif /* USE_DL */
|
||||||
|
|
|
@ -44,7 +44,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef NT
|
#ifdef MS_WIN32
|
||||||
#undef BYTE
|
#undef BYTE
|
||||||
#undef arglist
|
#undef arglist
|
||||||
#include "windows.h"
|
#include "windows.h"
|
||||||
|
@ -562,7 +562,7 @@ fatal(msg)
|
||||||
#ifdef macintosh
|
#ifdef macintosh
|
||||||
for (;;);
|
for (;;);
|
||||||
#endif
|
#endif
|
||||||
#ifdef NT
|
#ifdef MS_WIN32
|
||||||
OutputDebugString("Fatal Python error:");
|
OutputDebugString("Fatal Python error:");
|
||||||
OutputDebugString(msg);
|
OutputDebugString(msg);
|
||||||
OutputDebugString("\n");
|
OutputDebugString("\n");
|
||||||
|
|
|
@ -49,7 +49,7 @@ int sys_checkinterval = 10;
|
||||||
|
|
||||||
static object *sysdict;
|
static object *sysdict;
|
||||||
|
|
||||||
#ifdef NT
|
#ifdef MS_COREDLL
|
||||||
extern void *PyWin_DLLhModule;
|
extern void *PyWin_DLLhModule;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue