--- mstools/h/process.h 2018/08/09 18:20:01 1.1.1.1 +++ mstools/h/process.h 2018/08/09 18:21:07 1.1.1.3 @@ -1,7 +1,7 @@ /*** *process.h - definition and declarations for process control functions * -* Copyright (c) 1985-1991, Microsoft Corporation. All rights reserved. +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. * *Purpose: * This file defines the modeflag values for spawnxx calls. @@ -13,15 +13,45 @@ #ifndef _INC_PROCESS +#ifndef _POSIX_ + #ifdef __cplusplus extern "C" { #endif -#if (_MSC_VER <= 600) -#define __cdecl _cdecl +/* + * Conditional macro definition for function calling type and variable type + * qualifiers. + */ +#if ( (_MSC_VER >= 800) && (_M_IX86 >= 300) ) + +/* + * Definitions for MS C8-32 (386/486) compiler + */ +#define _CRTAPI1 __cdecl +#define _CRTAPI2 __cdecl + +#elif ( _MSC_VER == 600 ) + +/* + * Definitions for old MS C6-386 compiler + */ +#define _CRTAPI1 _cdecl +#define _CRTAPI2 _cdecl +#define _M_IX86 300 + +#else + +/* + * Other compilers (e.g., MIPS) + */ +#define _CRTAPI1 +#define _CRTAPI2 + #endif + /* modeflag values for _spawnxx routines */ #ifndef _MT @@ -40,7 +70,8 @@ extern int _p_overlay; #define _P_DETACH 4 -/* action codes used with _cwait() */ +/* Action codes for _cwait(). The action code argument to _cwait is ignored + on Win32 though it is accepted for compatibilty with OS/2 */ #define _WAIT_CHILD 0 #define _WAIT_GRANDCHILD 1 @@ -49,40 +80,39 @@ extern int _p_overlay; /* function prototypes */ #ifdef _MT -unsigned long _beginthread (void (*) (void *), +unsigned long _CRTAPI1 _beginthread (void (_CRTAPI1 *) (void *), unsigned, void *); -void _endthread(void); +void _CRTAPI1 _endthread(void); #endif -void abort(void); -void _cexit(void); -void _c_exit(void); -int _cwait(int *, int, int); -int _execl(const char *, const char *, ...); -int _execle(const char *, const char *, ...); -int _execlp(const char *, const char *, ...); -int _execlpe(const char *, const char *, ...); -int _execv(const char *, const char * const *); -int _execve(const char *, const char * const *, const char * const *); -int _execvp(const char *, const char * const *); -int _execvpe(const char *, const char * const *, const char * const *); -void exit(int); -void _exit(int); -int _getpid(void); -int _spawnl(int, const char *, const char *, ...); -int _spawnle(int, const char *, const char *, ...); -int _spawnlp(int, const char *, const char *, ...); -int _spawnlpe(int, const char *, const char *, ...); -int _spawnv(int, const char *, const char * const *); -int _spawnve(int, const char *, const char * const *, +void _CRTAPI1 abort(void); +void _CRTAPI1 _cexit(void); +void _CRTAPI1 _c_exit(void); +int _CRTAPI1 _cwait(int *, int, int); +int _CRTAPI2 _execl(const char *, const char *, ...); +int _CRTAPI2 _execle(const char *, const char *, ...); +int _CRTAPI2 _execlp(const char *, const char *, ...); +int _CRTAPI2 _execlpe(const char *, const char *, ...); +int _CRTAPI1 _execv(const char *, const char * const *); +int _CRTAPI1 _execve(const char *, const char * const *, const char * const *); +int _CRTAPI1 _execvp(const char *, const char * const *); +int _CRTAPI1 _execvpe(const char *, const char * const *, const char * const *); +void _CRTAPI1 exit(int); +void _CRTAPI1 _exit(int); +int _CRTAPI1 _getpid(void); +int _CRTAPI2 _spawnl(int, const char *, const char *, ...); +int _CRTAPI2 _spawnle(int, const char *, const char *, ...); +int _CRTAPI2 _spawnlp(int, const char *, const char *, ...); +int _CRTAPI2 _spawnlpe(int, const char *, const char *, ...); +int _CRTAPI1 _spawnv(int, const char *, const char * const *); +int _CRTAPI1 _spawnve(int, const char *, const char * const *, const char * const *); -int _spawnvp(int, const char *, const char * const *); -int _spawnvpe(int, const char *, const char * const *, +int _CRTAPI1 _spawnvp(int, const char *, const char * const *); +int _CRTAPI1 _spawnvpe(int, const char *, const char * const *, const char * const *); -int system(const char *); -int _wait(int *); -int _loaddll(char *); -int _unloaddll(int); -int (* _getdllprocaddr(int, char *, int))(); +int _CRTAPI1 system(const char *); +int _CRTAPI1 _loaddll(char *); +int _CRTAPI1 _unloaddll(int); +int (_CRTAPI1 * _CRTAPI1 _getdllprocaddr(int, char *, int))(); #if !__STDC__ /* Non-ANSI names for compatibility */ @@ -115,7 +145,6 @@ int (* _getdllprocaddr(int, char *, int) #define spawnve _spawnve #define spawnvp _spawnvp #define spawnvpe _spawnvpe -#define wait _wait #endif @@ -123,5 +152,7 @@ int (* _getdllprocaddr(int, char *, int) } #endif +#endif /* _POSIX_ */ + #define _INC_PROCESS #endif /* _INC_PROCESS */