diff options
author | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2022-04-06 13:33:38 +0300 |
---|---|---|
committer | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2022-04-13 11:32:09 +0300 |
commit | 96ade47c182bf37a2efca2aa62922e54e5ff1660 (patch) | |
tree | 93ceee6c6f8984f563f3dfe83e56f98b66b40f3a /src/libs/3rdparty/7zip/unix/CPP/include_windows | |
parent | 2d5f0ffaf1278516bbd74e3b60f9849f4c51cffa (diff) |
Move LZMA SDK to 3rdparty subdirectory
Also add attribution document.
Task-number: QTIFW-2336
Change-Id: I91546bc6c3ace244e4b546b945f40b7d204f7463
Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/libs/3rdparty/7zip/unix/CPP/include_windows')
4 files changed, 319 insertions, 0 deletions
diff --git a/src/libs/3rdparty/7zip/unix/CPP/include_windows/basetyps.h b/src/libs/3rdparty/7zip/unix/CPP/include_windows/basetyps.h new file mode 100644 index 000000000..2200cb7c3 --- /dev/null +++ b/src/libs/3rdparty/7zip/unix/CPP/include_windows/basetyps.h @@ -0,0 +1,19 @@ +#ifndef _BASETYPS_H +#define _BASETYPS_H + +#ifdef ENV_HAVE_GCCVISIBILITYPATCH + #define DLLEXPORT __attribute__ ((visibility("default"))) +#else + #define DLLEXPORT +#endif + +#ifdef __cplusplus +#define STDAPI extern "C" DLLEXPORT HRESULT +#else +#define STDAPI extern DLLEXPORT HRESULT +#endif /* __cplusplus */ + +typedef GUID IID; +typedef GUID CLSID; +#endif + diff --git a/src/libs/3rdparty/7zip/unix/CPP/include_windows/include_windows.pri b/src/libs/3rdparty/7zip/unix/CPP/include_windows/include_windows.pri new file mode 100644 index 000000000..5ef72fddd --- /dev/null +++ b/src/libs/3rdparty/7zip/unix/CPP/include_windows/include_windows.pri @@ -0,0 +1,3 @@ +HEADERS += $$7ZIP_BASE/CPP/include_windows/basetyps.h \ + $$7ZIP_BASE/CPP/include_windows/tchar.h \ + $$7ZIP_BASE/CPP/include_windows/windows.h diff --git a/src/libs/3rdparty/7zip/unix/CPP/include_windows/tchar.h b/src/libs/3rdparty/7zip/unix/CPP/include_windows/tchar.h new file mode 100644 index 000000000..5e89145af --- /dev/null +++ b/src/libs/3rdparty/7zip/unix/CPP/include_windows/tchar.h @@ -0,0 +1,89 @@ +/* + * tchar.h + * + * Unicode mapping layer for the standard C library. By including this + * file and using the 't' names for string functions + * (eg. _tprintf) you can make code which can be easily adapted to both + * Unicode and non-unicode environments. In a unicode enabled compile define + * _UNICODE before including tchar.h, otherwise the standard non-unicode + * library functions will be used. + * + * Note that you still need to include string.h or stdlib.h etc. to define + * the appropriate functions. Also note that there are several defines + * included for non-ANSI functions which are commonly available (but using + * the convention of prepending an underscore to non-ANSI library function + * names). + * + * This file is part of the Mingw32 package. + * + * Contributors: + * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp> + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAIMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * $Revision: 1.11 $ + * $Author: earnie $ + * $Date: 2003/05/03 13:48:46 $ + * + */ + +#ifndef _TCHAR_H_ +#define _TCHAR_H_ + +/* All the headers include this file. */ +#ifndef __int64 +#define __int64 long long +#endif + +#ifndef __cdecl +#define __cdecl /* */ +#endif + +/* + * NOTE: This tests _UNICODE, which is different from the UNICODE define + * used to differentiate Win32 API calls. + */ +#ifdef _UNICODE + + +/* + * Use TCHAR instead of char or wchar_t. It will be appropriately translated + * if _UNICODE is correctly defined (or not). + */ +#ifndef _TCHAR_DEFINED +typedef wchar_t TCHAR; +#define _TCHAR_DEFINED +#endif + +/* + * Unicode functions + */ +/* +#define _tfopen _wfopen +FILE *_wfopen( const wchar_t *filename, const wchar_t *mode ); +*/ + +#else /* Not _UNICODE */ + +#define _tfopen fopen + +/* + * TCHAR, the type you should use instead of char. + */ +#ifndef _TCHAR_DEFINED +typedef char TCHAR; +#define _TCHAR_DEFINED +#endif + +#endif /* Not _UNICODE */ + +#endif /* Not _TCHAR_H_ */ + diff --git a/src/libs/3rdparty/7zip/unix/CPP/include_windows/windows.h b/src/libs/3rdparty/7zip/unix/CPP/include_windows/windows.h new file mode 100644 index 000000000..59541864c --- /dev/null +++ b/src/libs/3rdparty/7zip/unix/CPP/include_windows/windows.h @@ -0,0 +1,208 @@ +/* + windows.h - main header file for the Win32 API + + Written by Anders Norlander <anorland@hem2.passagen.se> + + This file is part of a free library for the Win32 API. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +*/ +#ifndef _WINDOWS_H +#define _WINDOWS_H + +#include <stdarg.h> + +/* BEGIN #include <windef.h> */ + +#include "Common/MyWindows.h" // FIXED + +#ifndef CONST +#define CONST const +#endif + +#undef MAX_PATH +#define MAX_PATH 4096 /* Linux : 4096 - Windows : 260 */ + +#ifndef FALSE +#define FALSE 0 +#endif +#ifndef TRUE +#define TRUE 1 +#endif + +#define WINAPI + +#undef BOOL +typedef int BOOL; + + +#define CREATE_NEW 1 +#define CREATE_ALWAYS 2 +#define OPEN_EXISTING 3 +#define OPEN_ALWAYS 4 +/* #define TRUNCATE_EXISTING 5 */ + + + +/* BEGIN #include <winnt.h> */ +/* BEGIN <winerror.h> */ +#define NO_ERROR 0L +#define ERROR_ALREADY_EXISTS EEXIST +#define ERROR_FILE_EXISTS EEXIST +#define ERROR_INVALID_HANDLE EBADF +#define ERROR_PATH_NOT_FOUND ENOENT +#define ERROR_DISK_FULL ENOSPC +#define ERROR_NO_MORE_FILES 0x100018 // FIXME +#define ERROR_DIRECTORY 267 // FIXME + +// #define ERROR_NEGATIVE_SEEK 0x100131 // FIXME + + +/* see Common/WyWindows.h +#define S_OK ((HRESULT)0x00000000L) +#define S_FALSE ((HRESULT)0x00000001L) +#define E_INVALIDARG ((HRESULT)0x80070057L) +#define E_NOTIMPL ((HRESULT)0x80004001L) +#define E_NOINTERFACE ((HRESULT)0x80004002L) +#define E_ABORT ((HRESULT)0x80004004L) +#define E_FAIL ((HRESULT)0x80004005L) +#define E_OUTOFMEMORY ((HRESULT)0x8007000EL) +#define STG_E_INVALIDFUNCTION ((HRESULT)0x80030001L) +#define SUCCEEDED(Status) ((HRESULT)(Status) >= 0) +#define FAILED(Status) ((HRESULT)(Status)<0) +*/ +#ifndef VOID +#define VOID void +#endif +typedef void *PVOID,*LPVOID; +typedef WCHAR *LPWSTR; +typedef CHAR *LPSTR; +typedef TCHAR *LPTSTR; + +#ifdef UNICODE +/* + * P7ZIP_TEXT is a private macro whose specific use is to force the expansion of a + * macro passed as an argument to the macro TEXT. DO NOT use this + * macro within your programs. It's name and function could change without + * notice. + */ +#define P7ZIP_TEXT(q) L##q +#else +#define P7ZIP_TEXT(q) q +#endif +/* + * UNICODE a constant string when UNICODE is defined, else returns the string + * unmodified. + * The corresponding macros _TEXT() and _T() for mapping _UNICODE strings + * passed to C runtime functions are defined in mingw/tchar.h + */ +#define TEXT(q) P7ZIP_TEXT(q) + +typedef BYTE BOOLEAN; + +/* BEGIN #include <basetsd.h> */ +#ifndef __int64 +#define __int64 long long +#endif +typedef unsigned __int64 UINT64; +typedef __int64 INT64; +/* END #include <basetsd.h> */ + +#define FILE_ATTRIBUTE_READONLY 1 +#define FILE_ATTRIBUTE_HIDDEN 2 +#define FILE_ATTRIBUTE_SYSTEM 4 +#define FILE_ATTRIBUTE_DIRECTORY 16 +#define FILE_ATTRIBUTE_ARCHIVE 32 +#define FILE_ATTRIBUTE_DEVICE 64 +#define FILE_ATTRIBUTE_NORMAL 128 +#define FILE_ATTRIBUTE_TEMPORARY 256 +#define FILE_ATTRIBUTE_SPARSE_FILE 512 +#define FILE_ATTRIBUTE_REPARSE_POINT 1024 +#define FILE_ATTRIBUTE_COMPRESSED 2048 +#define FILE_ATTRIBUTE_OFFLINE 0x1000 +#define FILE_ATTRIBUTE_ENCRYPTED 0x4000 +#define FILE_ATTRIBUTE_UNIX_EXTENSION 0x8000 /* trick for Unix */ + +/* END <winerror.h> */ + +#include <string.h> +#include <stddef.h> + +/* END #include <winnt.h> */ + +/* END #include <windef.h> */ + +/* BEGIN #include <winbase.h> */ + +#define WAIT_OBJECT_0 0 +#define INFINITE 0xFFFFFFFF + +typedef struct _SYSTEMTIME { + WORD wYear; + WORD wMonth; + WORD wDayOfWeek; + WORD wDay; + WORD wHour; + WORD wMinute; + WORD wSecond; + WORD wMilliseconds; +} SYSTEMTIME; + +#ifdef __cplusplus +extern "C" { +#endif + +BOOL WINAPI DosDateTimeToFileTime(WORD,WORD,FILETIME *); +BOOL WINAPI FileTimeToDosDateTime(CONST FILETIME *,WORD *, WORD *); +BOOL WINAPI FileTimeToLocalFileTime(CONST FILETIME *,FILETIME *); +BOOL WINAPI FileTimeToSystemTime(CONST FILETIME *,SYSTEMTIME *); +BOOL WINAPI LocalFileTimeToFileTime(CONST FILETIME *,FILETIME *); +VOID WINAPI GetSystemTime(SYSTEMTIME *); +BOOL WINAPI SystemTimeToFileTime(const SYSTEMTIME*,FILETIME *); +VOID WINAPI GetSystemTimeAsFileTime(FILETIME * time); + +DWORD WINAPI GetTickCount(VOID); + +#ifdef __cplusplus +} +#endif +/* END #include <winbase.h> */ + +/* BEGIN #include <winnls.h> */ + +#define CP_ACP 0 +#define CP_OEMCP 1 +#define CP_UTF8 65001 + +/* #include <unknwn.h> */ +#include "basetyps.h" +struct IEnumSTATPROPSTG; + +typedef struct tagSTATPROPSTG { + const OLECHAR * lpwstrName; /* to avoid some warnings : LPOLESTR lpwstrName; */ + PROPID propid; + VARTYPE vt; +} STATPROPSTG; + +#ifdef __cplusplus +extern "C" const IID IID_ISequentialStream; +struct ISequentialStream : public IUnknown +{ + STDMETHOD(QueryInterface)(REFIID,PVOID*) PURE; + STDMETHOD_(ULONG,AddRef)(void) PURE; + STDMETHOD_(ULONG,Release)(void) PURE; + STDMETHOD(Read)(void*,ULONG,ULONG*) PURE; + STDMETHOD(Write)(void const*,ULONG,ULONG*) PURE; +}; +#else +extern const IID IID_ISequentialStream; +#endif /* __cplusplus */ + + +/* END #include <ole2.h> */ + +#endif + |