>From 8ed22bfc559210646cda7e66a3f485fab0927a78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20R=C3=B8nne?= Date: Mon, 23 Aug 2010 22:06:54 +0200 Subject: [PATCH 5/6] DOS 16 bit test include file Added a new include file which sets up Wine's main test include file for use with DOS 16 bit programs. --- include/wine/dos16test.h | 63 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 63 insertions(+), 0 deletions(-) create mode 100644 include/wine/dos16test.h diff --git a/include/wine/dos16test.h b/include/wine/dos16test.h new file mode 100644 index 0000000..28d1158 --- /dev/null +++ b/include/wine/dos16test.h @@ -0,0 +1,63 @@ +/* + * Definitions for Wine DOS C unit tests. + * + * Copyright (C) 2010 Morten R��nne + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * 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. See the GNU + * Lesser General Public License for more details. + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_WINE_DOS16_TEST_H +#define __WINE_WINE_DOS16_TEST_H + +#include +#include + +typedef int WORD; +typedef long int LONG; +typedef unsigned char WCHAR; +typedef long int DWORD; +typedef long int DWORD_PTR; +typedef long int ULONG_PTR; + +#define LOWORD(l) ((WORD)((DWORD_PTR)(l) & 0xFFFF)) + +/* Some functions DOS style */ +void ExitProcess(int code) +{ + exit(code); +} + +/* Since we are not threaded, no need to do anything special */ +void InterlockedIncrement(LONG *ptr) +{ + (*ptr)++; +} + +int TlsAlloc(void) +{ + return 0; +} + +int GetEnvironmentVariableA( const char *name, char *value, int max_size) +{ + value[0] = '\0'; + return 0; +} + +#define STANDALONE 1 + +#include "wine/test.h" + +#endif -- 1.7.0.4