*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _WINDEF_
# define __i386__
#endif
-#ifdef __x86_64__
+#if defined(__x86_64__) && !defined(_WIN64)
#define _WIN64
#endif
#ifndef __stdcall
# ifdef __i386__
# ifdef __GNUC__
-# define __stdcall __attribute__((__stdcall__))
+# ifdef __APPLE__ /* Mac OS X uses a 16-byte aligned stack and not a 4-byte one */
+# define __stdcall __attribute__((__stdcall__)) __attribute__((__force_align_arg_pointer__))
+# else
+# define __stdcall __attribute__((__stdcall__))
+# endif
# elif defined(_MSC_VER)
/* Nothing needs to be done. __stdcall already exists */
# else
#ifndef __cdecl
# if defined(__i386__) && defined(__GNUC__)
-# define __cdecl __attribute__((__cdecl__))
+# ifdef __APPLE__ /* Mac OS X uses 16-byte aligned stack and not a 4-byte one */
+# define __cdecl __attribute__((__cdecl__)) __attribute__((__force_align_arg_pointer__))
+# else
+# define __cdecl __attribute__((__cdecl__))
+# endif
# elif !defined(_MSC_VER)
# define __cdecl
# endif
#endif
#ifndef near
-#define near __ONLY_IN_WINELIB()
+#define near __ONLY_IN_WINELIB(/* nothing */)
#endif
#ifndef far
-#define far __ONLY_IN_WINELIB()
+#define far __ONLY_IN_WINELIB(/* nothing */)
#endif
#ifndef _near
-#define _near __ONLY_IN_WINELIB()
+#define _near __ONLY_IN_WINELIB(/* nothing */)
#endif
#ifndef _far
-#define _far __ONLY_IN_WINELIB()
+#define _far __ONLY_IN_WINELIB(/* nothing */)
#endif
#ifndef NEAR
-#define NEAR __ONLY_IN_WINELIB()
+#define NEAR __ONLY_IN_WINELIB(/* nothing */)
#endif
#ifndef FAR
-#define FAR __ONLY_IN_WINELIB()
+#define FAR __ONLY_IN_WINELIB(/* nothing */)
#endif
#ifndef _MSC_VER
# ifndef _declspec
-# define _declspec(x) __ONLY_IN_WINELIB()
+# define _declspec(x) __ONLY_IN_WINELIB(/* nothing */)
# endif
# ifndef __declspec
-# define __declspec(x) __ONLY_IN_WINELIB()
+# define __declspec(x) __ONLY_IN_WINELIB(/* nothing */)
# endif
#endif
typedef unsigned int UINT, *PUINT;
typedef float FLOAT, *PFLOAT;
typedef char *PSZ;
-#if defined(_WIN64) && !defined(_MSC_VER)
-typedef int *LPLONG;
-typedef unsigned int DWORD, *PDWORD, *LPDWORD;
-typedef unsigned int ULONG, *PULONG;
-#else
+#ifdef _MSC_VER
typedef long *LPLONG;
typedef unsigned long DWORD, *PDWORD, *LPDWORD;
typedef unsigned long ULONG, *PULONG;
+#else
+typedef int *LPLONG;
+typedef unsigned int DWORD, *PDWORD, *LPDWORD;
+typedef unsigned int ULONG, *PULONG;
#endif
/* Macros to map Winelib names to the correct implementation name */
/* Callback function pointers types */
-typedef INT (CALLBACK *FARPROC)();
-typedef INT (CALLBACK *PROC)();
+typedef INT_PTR (CALLBACK *FARPROC)();
+typedef INT_PTR (CALLBACK *NEARPROC)();
+typedef INT_PTR (CALLBACK *PROC)();
/* Macros to split words and longs. */
#endif
} POINTS, *PPOINTS, *LPPOINTS;
+typedef struct _FILETIME {
+#ifdef WORDS_BIGENDIAN
+ DWORD dwHighDateTime;
+ DWORD dwLowDateTime;
+#else
+ DWORD dwLowDateTime;
+ DWORD dwHighDateTime;
+#endif
+} FILETIME, *PFILETIME, *LPFILETIME;
+#define _FILETIME_
+
/* The RECT structure */
typedef struct tagRECT
{