Commit d1e46c5d authored by Alexandre Julliard's avatar Alexandre Julliard

Define __stdcall in msvcrt/process.h if windef.h hasn't been included.

parent d5281fd3
......@@ -34,12 +34,25 @@ typedef unsigned short MSVCRT(wchar_t);
#define _WAIT_CHILD 0
#define _WAIT_GRANDCHILD 1
#ifndef __stdcall
# ifdef __i386__
# ifdef __GNUC__
# define __stdcall __attribute__((__stdcall__))
# elif defined(_MSC_VER)
/* Nothing needs to be done. __stdcall already exists */
# else
# error You need to define __stdcall for your compiler
# endif
# else /* __i386__ */
# define __stdcall
# endif /* __i386__ */
#endif /* __stdcall */
#ifdef __cplusplus
extern "C" {
#endif
typedef void (__cdecl *_beginthread_start_routine_t)(void *);
typedef void (*_beginthread_start_routine_t)(void *);
typedef unsigned int (__stdcall *_beginthreadex_start_routine_t)(void *);
unsigned long _beginthread(_beginthread_start_routine_t,unsigned int,void*);
......
......@@ -41,22 +41,31 @@ extern "C" {
/* Calling conventions definitions */
#ifdef __i386__
# ifndef _X86_
# define _X86_
#if defined(__i386__) && !defined(_X86_)
# define _X86_
#endif
#ifndef __stdcall
# ifdef __i386__
# ifdef __GNUC__
# define __stdcall __attribute__((__stdcall__))
# elif defined(_MSC_VER)
/* Nothing needs to be done. __stdcall already exists */
# else
# error You need to define __stdcall for your compiler
# endif
# else /* __i386__ */
# define __stdcall
# endif /* __i386__ */
#endif /* __stdcall */
#ifndef __cdecl
# if defined(__i386__) && defined(__GNUC__)
# define __cdecl __attribute__((__cdecl__))
# elif !defined(_MSC_VER)
# define __cdecl
# endif
# if defined(__GNUC__) && ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 7)))
# define __stdcall __attribute__((__stdcall__))
# define __cdecl __attribute__((__cdecl__))
# elif defined(_MSC_VER)
/* Nothing needs to be done. __cdecl/__stdcall already exists */
# else
# error You need gcc >= 2.7 to build Wine on a 386
# endif /* __GNUC__ */
#else /* __i386__ */
# define __stdcall
# define __cdecl
#endif /* __i386__ */
#endif /* __stdcall */
#ifndef __WINESRC__
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment