1 /* Copyright (C) 2007-2010 The Android Open Source Project 2 ** 3 ** This software is licensed under the terms of the GNU General Public 4 ** License version 2, as published by the Free Software Foundation, and 5 ** may be copied, distributed, and modified under those terms. 6 ** 7 ** This program is distributed in the hope that it will be useful, 8 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 9 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 ** GNU General Public License for more details. 11 */ 12 13 /* 14 * Includes common headers for the ELFF library. 15 */ 16 17 #ifndef ELFF_ELFF_COMMON_H_ 18 #define ELFF_ELFF_COMMON_H_ 19 20 #include "stddef.h" 21 #include "sys/types.h" 22 #include "assert.h" 23 #include "memory.h" 24 #include "errno.h" 25 #include "stdlib.h" 26 #ifdef WIN32 27 #include "windows.h" 28 #else // WIN32 29 #include <sys/mman.h> 30 #include <sys/stat.h> 31 #include <fcntl.h> 32 #endif // WIN32 33 _set_errno(uint32_t err)34static inline void _set_errno(uint32_t err) { 35 errno = err; 36 } 37 38 #endif // ELFF_ELFF_COMMON_H_ 39