fixed build with mingw on ubuntu 64-bit
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6432 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
d229abcf72
commit
e798b125ca
2 changed files with 24 additions and 27 deletions
|
@ -15,32 +15,34 @@
|
|||
* warranty.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifndef __COMMON_TYPES_H
|
||||
#define __COMMON_TYPES_H
|
||||
|
||||
#ifndef _7ZIP_BYTE_DEFINED
|
||||
#define _7ZIP_BYTE_DEFINED
|
||||
typedef unsigned char Byte;
|
||||
typedef uint8_t Byte;
|
||||
#endif
|
||||
|
||||
#ifndef _7ZIP_INT16_DEFINED
|
||||
#define _7ZIP_INT16_DEFINED
|
||||
typedef short Int16;
|
||||
typedef int16_t Int16;
|
||||
#endif
|
||||
|
||||
#ifndef _7ZIP_UINT16_DEFINED
|
||||
#define _7ZIP_UINT16_DEFINED
|
||||
typedef unsigned short UInt16;
|
||||
typedef uint16_t UInt16;
|
||||
#endif
|
||||
|
||||
#ifndef _7ZIP_INT32_DEFINED
|
||||
#define _7ZIP_INT32_DEFINED
|
||||
typedef int Int32;
|
||||
typedef int32_t Int32;
|
||||
#endif
|
||||
|
||||
#ifndef _7ZIP_UINT32_DEFINED
|
||||
#define _7ZIP_UINT32_DEFINED
|
||||
typedef unsigned int UInt32;
|
||||
typedef uint32_t UInt32;
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
@ -59,12 +61,12 @@ typedef unsigned __int64 UInt64;
|
|||
|
||||
#ifndef _7ZIP_INT64_DEFINED
|
||||
#define _7ZIP_INT64_DEFINED
|
||||
typedef long long int Int64;
|
||||
typedef int64_t Int64;
|
||||
#endif
|
||||
|
||||
#ifndef _7ZIP_UINT64_DEFINED
|
||||
#define _7ZIP_UINT64_DEFINED
|
||||
typedef unsigned long long int UInt64;
|
||||
typedef uint64_t UInt64;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -41,32 +41,27 @@ typedef unsigned short WINWCHAR;
|
|||
#include <shlwapi.h>
|
||||
#include <shlobj.h>
|
||||
#else
|
||||
# include <stdint.h>
|
||||
# ifndef EXEHEAD
|
||||
# include <string.h>
|
||||
# include <stdlib.h>
|
||||
# endif
|
||||
// basic types
|
||||
typedef unsigned char BYTE, *PBYTE, *LPBYTE;
|
||||
typedef unsigned short WORD, *LPWORD;
|
||||
typedef unsigned long DWORD, *LPDWORD;
|
||||
typedef short SHORT;
|
||||
typedef unsigned short USHORT;
|
||||
typedef unsigned int UINT;
|
||||
typedef unsigned int UINT32;
|
||||
typedef int INT;
|
||||
typedef int INT32;
|
||||
typedef long LONG;
|
||||
typedef unsigned long ULONG;
|
||||
typedef long long INT64, LARGE_INTEGER;
|
||||
typedef unsigned long long UINT64, ULARGE_INTEGER;
|
||||
#include <stdint.h>
|
||||
#ifdef INTPTR_MAX
|
||||
typedef uint8_t BYTE, *PBYTE, *LPBYTE;
|
||||
typedef uint16_t WORD, *LPWORD;
|
||||
typedef uint32_t DWORD, *LPDWORD;
|
||||
typedef int16_t SHORT;
|
||||
typedef uint16_t USHORT;
|
||||
typedef uint32_t UINT;
|
||||
typedef uint32_t UINT32;
|
||||
typedef int32_t INT;
|
||||
typedef int32_t INT32;
|
||||
typedef int32_t LONG;
|
||||
typedef uint32_t ULONG;
|
||||
typedef int64_t INT64, LARGE_INTEGER;
|
||||
typedef uint64_t UINT64, ULARGE_INTEGER;
|
||||
typedef intptr_t INT_PTR;
|
||||
typedef uintptr_t UINT_PTR;
|
||||
#else
|
||||
typedef int INT_PTR;
|
||||
typedef unsigned int UINT_PTR;
|
||||
#endif
|
||||
typedef int BOOL, *LPBOOL;
|
||||
typedef short VARIANT_BOOL;
|
||||
typedef void VOID;
|
||||
|
@ -217,7 +212,7 @@ typedef DWORDLONG ULONGLONG,*PULONGLONG;
|
|||
|
||||
#ifndef _WIN32
|
||||
# ifndef FIELD_OFFSET
|
||||
# define FIELD_OFFSET(t,f) ((LONG)&(((t*)0)->f))
|
||||
# define FIELD_OFFSET(t,f) ((UINT_PTR)&(((t*)0)->f))
|
||||
# endif
|
||||
# ifndef MAKEINTRESOURCEA
|
||||
# define MAKEINTRESOURCEA(i) ((LPSTR)((ULONG_PTR)((WORD)(i))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue