⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sysenv.h

📁 一个Linux下的软猫驱动
💻 H
📖 第 1 页 / 共 2 页
字号:
/* * Copyright (c) 2003-2004 Linuxant inc. * Copyright (c) 2001-2004 Conexant Systems, Inc. *  * 1.   Permitted use. Redistribution and use in source and binary forms, * without modification, are only permitted under the terms set forth herein. *  * 2.   Disclaimer of Warranties. LINUXANT, ITS SUPPLIERS, AND OTHER CONTRIBUTORS * MAKE NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. * IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTIES OF ANY KIND. * LINUXANT AND OTHER CONTRIBUTORS DISCLAIMS ALL WARRANTIES WITH REGARD * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE, GOOD TITLE AND AGAINST INFRINGEMENT. *  * This software has not been formally tested, and there is no guarantee that * it is free of errors including, but not limited to, bugs, defects, * interrupted operation, or unexpected results. Any use of this software is * at user's own risk. *  * 3.   No Liability. *  * (a) Linuxant, its suppliers, or contributors shall not be responsible for * any loss or damage to users, customers, or any third parties for any reason * whatsoever, and LINUXANT, ITS SUPPLIERS OR CONTRIBUTORS SHALL NOT BE LIABLE * FOR ANY ACTUAL, DIRECT, INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL, OR * CONSEQUENTIAL (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED, WHETHER IN CONTRACT, STRICT OR OTHER LEGAL THEORY OF * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY * OF SUCH DAMAGE. *  * (b) User agrees to hold Linuxant, its suppliers, and contributors harmless * from any liability, loss, cost, damage or expense, including attorney's fees, * as a result of any claims which may be made by any person, including * but not limited to User, its agents and employees, its customers, or * any third parties that arise out of or result from the manufacture, * delivery, actual or alleged ownership, performance, use, operation * or possession of the software furnished hereunder, whether such claims * are based on negligence, breach of contract, absolute liability or any * other legal theory. *  * 4.   Notices. User hereby agrees not to remove, alter or destroy any * copyright, trademark, credits, other proprietary notices or confidential * legends placed upon, contained within or associated with the Software, * and shall include all such unaltered copyright, trademark, credits, * other proprietary notices or confidential legends on or in every copy of * the Software. *  * 5.   Reverse-engineering. User hereby agrees not to reverse engineer, * decompile, or disassemble the portions of this software provided solely * in object form, nor attempt in any manner to obtain their source-code. *  * 6.   Redistribution. Redistribution of this software is only permitted * for exact copies (without modification) of versions explicitly marked * and officially released by Linuxant with the word "free" in their name. * Redistribution or disclosure of other versions, derivatives or license key * information is expressly prohibited without explicit written approval signed * by an authorized Linuxant officer. *  * 7.   Performance. V.92 modems are designed to be capable of receiving data at * up to 56Kbps with compatible phone line and server equipment, and transmitting * data at up to 31.2Kbps. V.90 modems are designed to be capable of receiving * data at up to 56 Kbps from a compatible service provider and transmitting data * at up to about 28.8 Kbps. Public networks currently limit download speeds to * about 53Kbps. The free version of the drivers is limited to 14.4Kbps. * Actual speeds vary and are often less than the maximum possible. *  *  *//*************************************************************************  File Name: Sysenv.h  File Description: System dependence file.                    This file includes some system files (if OS_DEPENDENT == 1)                    and defines some system types, calling conventions, etc.  *************************************************************************/ #ifndef __SYSENV_H__#define __SYSENV_H__ #ifndef OS_DEPENDENT#define OS_DEPENDENT 0#define UNDEF_OS_DEPENDENT#endif#ifdef VERBOSE    /* if defined VERBOSE - need to compile with OS_DEPENDENT. */#undef OS_DEPENDENT#define OS_DEPENDENT 1#endif#if (CPU_TYPE==CPU_AMD64)#define lg32 int#else#define lg32 long#endif #ifdef USE_DDK /** if we use DDK (in SessionCtrl compilation) we want to include the igors 	ostypedefs and typedefs which made for ddk. we close the else in the end 	of the file - nothing is used in the file in case of DDK compilation .    **/  #if (OS_DEPENDENT == 1 )#include "ostypedefs.h"#else#include "typedefs.h"#endif #else /** USE_DDK **/ #if ( OS_DEPENDENT == 1 )/* include dbgfuncs.h for debug printing: */#include "dbgfuncs.h"#if ( OS_TYPE == OS_WIN_9X )#if ( UK_MODE == UK_KERNEL ) #ifdef __cplusplus#include <vtoolscp.h>#else#include <vtoolsc.h>#endif /* __cplusplus */ #else /* UK_USER: */#pragma warning (disable:4115) #pragma warning (disable:4214) #pragma warning (disable:4201) #include <windows.h>#pragma warning (default:4201)#pragma warning (default:4214)#pragma warning (default:4115)#define DllExport   __declspec( dllexport )#endif /* UK_MODE */#if (DEV_TOOL != DT_VTOOLSD)#if (CPU_TYPE != CPU_AMD64)typedef int ptrdiff_t;typedef unsigned int    size_t;#endif /* (DEV_TOOL != DT_VTOOLSD) */#endif /* (CPU_TYPE != CPU_AMD64)*/#endif /* OS_WIN_9X */#if ( OS_TYPE == OS_LINUX )typedef void    *HANDLE;typedef HANDLE  *PHANDLE;typedef HANDLE  HWND, HHOOK;typedef void    VOID, *PVOID, **PPVOID;#endif /* OS_LINUX */#if ( (OS_TYPE == OS_DOS) && (PRJ_FLAVOUR == PRJFLVR_HSF) )#include <string.h>#include <alloc.h>#endif#if ( (OS_ONE_OF(OS_WIN_NT4 | OS_WIN_WDM)) && (UK_MODE == UK_KERNEL) )#ifndef DBG#define CANCEL_DBG#endif#if (DEV_TOOL == DT_VDW)#ifdef __cplusplus#include <vdw.h>#endif#elif (DEV_TOOL == DT_MS98DDK)#ifdef __cplusplusextern "C"{#endif#include <wdm.h>#ifdef __cplusplus}#endiftypedef void	**PPVOID;#endif#if (OS_TYPE == OS_WIN_WDM) && (DEV_TOOL == DT_MS98DDK)typedef struct{    PDMA_ADAPTER    pDmaAdapter;    PKSPIN_LOCK     SpinLock;    ULONG           Vector;    KIRQL           Irql;    KIRQL           SynchronizeIrql;    KINTERRUPT_MODE InterruptMode;    BOOLEAN         ShareVector;    KAFFINITY       ProcessorEnableMask;    BOOLEAN         FloatingSave;	PDEVICE_OBJECT	pDevObj;	struct _IRP *   Irp;}WDM_RESOURCES_T;#endif /* (OS_TYPE == OS_WIN_WDM) && (DEV_TOOL == DT_MS98DDK) */#ifdef CANCEL_DBG#undef DBG#endif#endif /* OS_WIN_NT4 | OS_WIN_WDM */#if ( (OS_TYPE == OS_DOS) && (UK_MODE == UK_USER))typedef char    *HANDLE;typedef HANDLE  *PHANDLE;typedef void    VOID, *PVOID;#define IN  const#endif /* OS_DOS && UK_USER */#if ( UK_MODE == UK_USER )#if ( OS_TYPE != OS_LINUX )typedef void	**PPVOID;#endif#endif#if (OS_TYPE == OS_VXWORKS)#include <vxworks.h>#include <math.h>#include <stdlib.h>#include <stdio.h>#include <string.h>#include <memlib.h>#include <cachelib.h>#include <loglib.h>typedef char    *HANDLE;typedef HANDLE  *PHANDLE;typedef void    *PVOID, **PPVOID;#define IN const#endif /** OS_VXWORKS **/#if (OS_TYPE == OS_STB) #include <string.h>#include <stdio.h>#include <stdarg.h> typedef unsigned long			DWORD,  *PDWORD;typedef void					VOID  , *PVOID, **PPVOID;typedef unsigned short			UINT16, *PUINT16;typedef unsigned long			UINT32, *PUINT32;typedef long					INT32;typedef char*					HANDLE;typedef unsigned char			BYTE,   *PBYTE;typedef int						BOOL;typedef char					HAR,   *PCHAR, **PPCHAR;typedef unsigned short			WORD,   *PWORD;typedef unsigned int volatile   VOL32, *PVOL32;#include "hsf4octopus/driver/rio/daa.h" #endif /* OS_STB */  #else /* not OS_DEPENDENT defines: */typedef void    *HANDLE;typedef HANDLE  *PHANDLE;typedef void     VOID, *PVOID, **PPVOID;typedef volatile PVOID      *PVPVOID; typedef short    SHORT;/*#if (OS_TYPE != OS_VXWORKS) */#if ( CPU_TYPE != CPU_AMD64 ) && !defined (_PTRDIFF_T)typedef int ptrdiff_t;#if(COMPILER != CMP_XCC) /* #if(PROJECT!=PRJ_SANSIRO) */#ifndef _SIZE_Ttypedef unsigned int    size_t;#define _SIZE_T#endif#endif /* size_t */#endif /* !AMD64*//*#endif !OS_VXWORKS*/#endif /* OS_DEPENDENT == 1 */ #if (OS_TYPE == OS_LINUX)#if ( UK_MODE == UK_KERNEL )#ifndef FRAME_WORK_IMPORTED#define _LOOSE_KERNEL_NAMES#include <math.h>#undef _LOOSE_KERNEL_NAMES#endif /* FRAME_WORK_IMPORTED */ #ifdef __cplusplus#else#include <stdarg.h>#endif#endif /* UK_KERNEL */#else#define printk DPRINTF#endif#if OS_ONE_OF( OS_LINUX | OS_VXWORKS |  OS_STB )typedef char    *LPSTR;typedef const char *LPCSTR;#ifdef __GNUC__#define IN#else#define IN const#endif#endif #if ( UK_MODE == UK_USER ) #include <stdio.h>#include <math.h> #include <stdlib.h>#include <string.h> #endif /* UK_USER */  /*****************************************************************************//* Check all the next lines!!! they are taken from the SoftK56 commondefs.h  */#if 0#if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)#define NTAPI __stdcall#else#define _cdecl#define NTAPI#endif#if ((defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS))#define DECLSPEC_IMPORT __declspec(dllimport)#else#define DECLSPEC_IMPORT#endif#if !defined(_NTSYSTEM_)#define NTSYSAPI DECLSPEC_IMPORT#else#define NTSYSAPI#endif#if defined(_M_MRX000) || defined(_M_ALPHA) || defined(_M_PPC)#define UNALIGNED __unaligned#else#define UNALIGNED#endif#ifndef CONST#define CONST               const#endif#endif/*****************************************************************************/#if ( (OS_ONE_OF(OS_WIN_NT4 | OS_WIN_WDM)) && (UK_MODE == UK_KERNEL) )#define _fastcall#define __fastcall#ifdef __cplusplus#if (OVERRIDE_NEW == 1)extern void* _cdecl operator new( size_t Size, char* FileName, int LineNumber );#define		NEW		new(__FILE__,__LINE__)#else#define NEW new(NonPagedPool)#endif  /* OVERRIDE_NEW */#endif  /* __cplusplus */#ifdef __cplusplusextern "C"{#endif	int sprintf( char *buffer, const char *format ,... );#ifdef __cplusplus}#endif#else

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -