Blame src/w32-ce.h

Packit Service 6c01f9
/* w32-ce.h
Packit Service 6c01f9
   Copyright (C) 2010 g10 Code GmbH
Packit Service 6c01f9
Packit Service 6c01f9
   This file is part of GPGME.
Packit Service 6c01f9
Packit Service 6c01f9
   GPGME is free software; you can redistribute it and/or modify it
Packit Service 6c01f9
   under the terms of the GNU Lesser General Public License as
Packit Service 6c01f9
   published by the Free Software Foundation; either version 2.1 of
Packit Service 6c01f9
   the License, or (at your option) any later version.
Packit Service 6c01f9
Packit Service 6c01f9
   GPGME is distributed in the hope that it will be useful, but
Packit Service 6c01f9
   WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 6c01f9
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service 6c01f9
   Lesser General Public License for more details.
Packit Service 6c01f9
Packit Service 6c01f9
   You should have received a copy of the GNU Lesser General Public
Packit Service 6c01f9
   License along with this program; if not, write to the Free Software
Packit Service 6c01f9
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
Packit Service 6c01f9
   02111-1307, USA.  */
Packit Service 6c01f9
Packit Service 6c01f9
#ifndef GPGME_W32_CE_H
Packit Service 6c01f9
#define GPGME_W32_CE_H
Packit Service 6c01f9
Packit Service 6c01f9
#include <time.h>
Packit Service 6c01f9
#include <stdarg.h>
Packit Service 6c01f9
Packit Service 6c01f9
#ifdef _MSC_VER
Packit Service 6c01f9
typedef int pid_t;
Packit Service 6c01f9
#define strdup _strdup
Packit Service 6c01f9
#define strcasecmp _stricmp
Packit Service 6c01f9
#endif
Packit Service 6c01f9
Packit Service 6c01f9
#include <winsock2.h>
Packit Service 6c01f9
#include <ws2tcpip.h> /* For getaddrinfo.  */
Packit Service 6c01f9
#include <windows.h>
Packit Service 6c01f9
Packit Service 6c01f9
#define getenv _gpgme_wince_getenv
Packit Service 6c01f9
char *getenv (const char *name);
Packit Service 6c01f9
Packit Service 6c01f9
#include <io.h>
Packit Service 6c01f9
#define isatty(fd) 0
Packit Service 6c01f9
Packit Service 6c01f9
Packit Service 6c01f9
/* Windows CE is missing some Windows functions that we want.  */
Packit Service 6c01f9
Packit Service 6c01f9
#define GetSystemTimeAsFileTime _gpgme_wince_GetSystemTimeAsFileTime
Packit Service 6c01f9
void GetSystemTimeAsFileTime (LPFILETIME ftp);
Packit Service 6c01f9
Packit Service 6c01f9
#define DeleteFileA _gpgme_wince_DeleteFileA
Packit Service 6c01f9
BOOL DeleteFileA(LPCSTR);
Packit Service 6c01f9
Packit Service 6c01f9
#define CreateFileA _gpgme_wince_CreateFileA
Packit Service 6c01f9
HANDLE CreateFileA (LPCSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES,
Packit Service 6c01f9
                    DWORD, DWORD, HANDLE);
Packit Service 6c01f9
Packit Service 6c01f9
#define CreateProcessA _gpgme_wince_CreateProcessA
Packit Service 6c01f9
BOOL CreateProcessA(LPCSTR,LPSTR,LPSECURITY_ATTRIBUTES,LPSECURITY_ATTRIBUTES,BOOL,DWORD,PVOID,LPCSTR,LPSTARTUPINFOA,LPPROCESS_INFORMATION);
Packit Service 6c01f9
Packit Service 6c01f9
#define RegOpenKeyExA _gpgme_wince_RegOpenKeyExA
Packit Service 6c01f9
LONG RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,PHKEY);
Packit Service 6c01f9
Packit Service 6c01f9
#define RegQueryValueExA _gpgme_wince_RegQueryValueExA
Packit Service 6c01f9
LONG WINAPI RegQueryValueExA(HKEY,LPCSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
Packit Service 6c01f9
Packit Service 6c01f9
#define GetTempPathA _gpgme_wince_GetTempPathA
Packit Service 6c01f9
DWORD GetTempPathA(DWORD,LPSTR);
Packit Service 6c01f9
Packit Service 6c01f9
#define SHGetSpecialFolderPathA _gpgme_wince_SHGetSpecialFolderPathA
Packit Service 6c01f9
BOOL SHGetSpecialFolderPathA(HWND,LPSTR,int,BOOL);
Packit Service 6c01f9
Packit Service 6c01f9
int _gpgme_wince_access (const char *fname, int mode);
Packit Service 6c01f9
#define access(a,b) _gpgme_wince_access ((a), (b))
Packit Service 6c01f9
Packit Service 6c01f9
void *_gpgme_wince_bsearch (const void *key, const void *base,
Packit Service 6c01f9
                            size_t nmemb, size_t size,
Packit Service 6c01f9
                            int (*compar) (const void *, const void *));
Packit Service 6c01f9
#define bsearch(a,b,c,d,e) _gpgme_wince_bsearch ((a),(b),(c),(d),(e))
Packit Service 6c01f9
Packit Service 6c01f9
#if defined(_MSC_VER)
Packit Service 6c01f9
  /* Remove the redefined __leave keyword.  It is defined by MSC for
Packit Service 6c01f9
     W32 in excpt.h and not in sehmap.h as for the plain windows
Packit Service 6c01f9
     version.  */
Packit Service 6c01f9
# undef leave
Packit Service 6c01f9
# define HKEY_PERFORMANCE_DATA ((HKEY)0x80000004)
Packit Service 6c01f9
# define HKEY_CURRENT_CONFIG  ((HKEY)0x80000005)
Packit Service 6c01f9
  /* Replace the Mingw32CE provided abort function.  */
Packit Service 6c01f9
# define abort() do { TerminateProcess (GetCurrentProcess(), 8); } while (0)
Packit Service 6c01f9
# define _IOLBF 0x40
Packit Service 6c01f9
#endif
Packit Service 6c01f9
Packit Service 6c01f9
#endif /* GPGME_W32_CE_H */