/* *********************************************************************************************** This file is provided under a dual BSD/GPLv2 license. When using or redistributing this file, you may do so under either license. GPL LICENSE SUMMARY Copyright(c) 2013 Intel Corporation. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. The full GNU General Public License is included in this distribution in the file called LICENSE.GPL. Contact Information: SOCWatch Developer Team BSD LICENSE Copyright(c) 2013 Intel Corporation. All rights reserved. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 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. *********************************************************************************************** */ #ifndef _PW_TYPES_H_ #define _PW_TYPES_H_ #if defined (__linux__) #ifndef __KERNEL__ /* * Called from Ring-3. */ #include // Grab 'uint64_t' etc. /* * UNSIGNED types... */ typedef uint8_t u8; typedef uint16_t u16; typedef uint32_t u32; typedef uint64_t u64; /* * SIGNED types... */ typedef int8_t s8; typedef int16_t s16; typedef int32_t s32; typedef int64_t s64; #endif // __KERNEL__ #elif defined (_WIN32) /* * UNSIGNED types... */ typedef unsigned char u8; typedef unsigned short u16; typedef unsigned int u32; typedef unsigned long long u64; /* * SIGNED types... */ typedef signed char s8; typedef signed short s16; typedef signed int s32; typedef signed long long s64; typedef s32 pid_t; typedef s32 ssize_t; #endif // _WIN32 /* ************************************ * Common to both operating systems. * ************************************ */ /* * UNSIGNED types... */ typedef u8 pw_u8_t; typedef u16 pw_u16_t; typedef u32 pw_u32_t; typedef u64 pw_u64_t; /* * SIGNED types... */ typedef s8 pw_s8_t; typedef s16 pw_s16_t; typedef s32 pw_s32_t; typedef s64 pw_s64_t; typedef pid_t pw_pid_t; #endif // _PW_TYPES_H_