Initial work for autogenerating ntdef.h and winnt.h to reduce code duplication by sharing a lot of stuff.

svn path=/trunk/; revision=63998
This commit is contained in:
Timo Kreuzer 2014-08-30 21:35:16 +00:00
parent e6b0427c92
commit bc9e621611
4 changed files with 6512 additions and 0 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,98 @@
/*
* ntdef.h
*
* This file is part of the ReactOS PSDK package.
*
* Contributors:
* Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
*
* 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.
*
*/
#ifndef _NTDEF_
#define _NTDEF_
#pragma once
/* Dependencies */
#include <ctype.h>
//#include <winapifamily.h>
#include <basetsd.h>
#include <guiddef.h>
#include <excpt.h>
#include <sdkddkver.h>
#include <specstrings.h>
#include <kernelspecs.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Default to strict */
#ifndef NO_STRICT
#ifndef STRICT
#define STRICT 1
#endif
#endif
/* Pseudo Modifiers for Input Parameters */
#ifndef IN
#define IN
#endif
#ifndef OUT
#define OUT
#endif
#ifndef OPTIONAL
#define OPTIONAL
#endif
#ifndef NOTHING
#define NOTHING
#endif
#ifndef CRITICAL
#define CRITICAL
#endif
/* Constant modifier */
#ifndef CONST
#define CONST const
#endif
/* TRUE/FALSE */
#define FALSE 0
#define TRUE 1
/* NULL/NULL64 */
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#define NULL64 0
#else
#define NULL ((void *)0)
#define NULL64 ((void * POINTER_64)0)
#endif
#endif /* NULL */
$define(_NTDEF_)
$define(ULONG=ULONG)
$define(USHORT=USHORT)
$define(UCHAR=UCHAR)
$include(ntbasedef.h)
#ifdef __cplusplus
} // extern "C"
#endif
#endif /* _NTDEF_ */

View file

@ -0,0 +1,77 @@
/*
* winnt.h
*
* Windows NT native definitions for user mode
*
* This file is part of the ReactOS PSDK package.
*
* Contributors:
* Timo Kreuzer (timo.kreuzer@reactos.org)
*
* 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.
*
*/
#pragma once
#define _WINNT_
/* We require WDK / VS 2008 or newer */
#if defined(_MSC_VER) && (_MSC_VER < 1500)
#error Compiler too old!
#endif
/* HACK for wine code */
#if !defined(__ROS_LONG64__)
#ifdef __WINESRC__
#define __ROS_LONG64__
#endif
#endif
#include <ctype.h>
//#include <winapifamily.h>
#include <msvctarget.h>
#include <specstrings.h>
#include <kernelspecs.h>
#include <excpt.h>
#include <basetsd.h>
#include <guiddef.h>
#include <intrin.h>
#undef __need_wchar_t
#include <winerror.h>
#include <stddef.h>
#include <sdkddkver.h>
#ifndef RC_INVOKED
#include <string.h>
#endif
/* Silence some MSVC warnings */
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable:4201)
#pragma warning(disable:4214)
#endif
#ifdef __cplusplus
extern "C" {
#endif
$define(_WINNT_)
$define(ULONG=DWORD)
$define(USHORT=WORD)
$define(UCHAR=BYTE)
$include(ntbasedef.h)
$include(winnt_old.h)
#ifdef __cplusplus
} // extern "C"
#endif

File diff suppressed because it is too large Load diff