PSP2SDK
dirty-f9e4f2d
The free SDK for PSP2
|
00001 /* 00002 * Copyright (C) 2015 PSP2SDK Project 00003 * 00004 * This Source Code Form is subject to the terms of the Mozilla Public 00005 * License, v. 2.0. If a copy of the MPL was not distributed with this 00006 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 00007 * 00008 * Modified for PSP2 by PSP2SDK Team 00009 */ 00010 00011 #ifndef _NEWLIB_STDIO_H 00012 #define _NEWLIB_STDIO_H 00013 00014 #include <sys/lock.h> 00015 00016 /* Internal locking macros, used to protect stdio functions. In the 00017 general case, expand to nothing. Use __SSTR flag in FILE _flags to 00018 detect if FILE is private to sprintf/sscanf class of functions; if 00019 set then do nothing as lock is not initialised. */ 00020 #if !defined(_flockfile) 00021 #ifndef __SINGLE_THREAD__ 00022 # define _flockfile(fp) (((fp)->_flags & __SSTR) ? 0 : __flockfile(fp)) 00023 #else 00024 # define _flockfile(fp) (_CAST_VOID 0) 00025 #endif 00026 #endif 00027 00028 #if !defined(_funlockfile) 00029 #ifndef __SINGLE_THREAD__ 00030 # define _funlockfile(fp) (((fp)->_flags & __SSTR) ? 0 : __funlockfile(fp)) 00031 #else 00032 # define _funlockfile(fp) (_CAST_VOID 0) 00033 #endif 00034 #endif 00035 00036 #endif /* _NEWLIB_STDIO_H */