📄 pibasic.h
字号:
/*******************************************************************************
* Filename : pibasic.h
* Description : I2 basic types header file
* It defines the basic data structures that are commonly used
* in I2 API.
* Created on : 02/05/2004
* CVS Version : $Id: pibasic.h,v 1.1 2004/03/24 03:24:12 weny Exp $
*
* Copyright (C) 2004-2004 Promise Technology Inc.
* All Rights Reserved
******************************************************************************/
#ifndef PROMISE_I2_BASIC_H
#define PROMISE_I2_BASIC_H
/* --- standard C lib header files ------------------------------------------ */
#if defined(WINDOWS)
#include <windows.h>
#elif defined(LINUX) || defined(FREEBSD)
#include <pthread.h>
#endif
/* --- internal header files ------------------------------------------------ */
/* --- constants & data structures ------------------------------------------ */
#define IN
#define OUT
typedef unsigned char u8;
typedef u8 __u8;
typedef unsigned short u16;
typedef u16 __u16;
typedef unsigned int u32;
typedef u32 __u32;
typedef signed short i16;
typedef i16 __i16;
#ifdef WINDOWS
typedef unsigned __int64 u64;
typedef DWORD pid_t;
#else
typedef unsigned long long u64;
#endif
//add 20050805
#ifdef _X86_64_TYPES_H
// typedef u64 __u64;
#endif
//add end
#ifndef TRUE
#define TRUE 0x1
#endif
#ifndef FALSE
#define FALSE 0x0
#endif
typedef u8 boolean_t;
#if defined(WINDOWS)
#define CURRENT_PROCESS_ID() GetCurrentProcessId()
#define CURRENT_THREAD_ID() GetCurrentThreadId()
#define strcasecmp _stricmp
#define strncasecmp _strnicmp
#define snprintf _snprintf
#define vsnprintf _vsnprintf
#define __attribute__(__X__)
#elif defined(LINUX) || defined(FREEBSD)
#define strcmpi strcasecmp
#define stricmp strcasecmp
#define CURRENT_PROCESS_ID() getpid()
#define CURRENT_THREAD_ID() pthread_self()
#endif
/* user group id */
#define USER_GROUP_NONE 0 /* When a user belongs to this group, it means the username have been removed */
#define USER_GROUP_USER 1 /* view only */
#define USER_GROUP_MAINTENANCE 2 /* hot spare, bg activity and view */
#define USER_GROUP_POWER 3 /* create configuration, and maintenance */
#define USER_GROUP_SUPER 4 /* full access */
#define MAX_PATH_LENGTH 255
/* --- functional routines ------------------------------------------------- */
/* no functions */
#endif /* PROMISE_I2_BASIC_H */
/******************************************************************************
* Change Log
*
* $Log: pibasic.h,v $
* Revision 1.1 2004/03/24 03:24:12 weny
* I2 API porting
*
*
*****************************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -