C51的库函数有些是再入函数,为什么在头文件里这些库函数的声明里没有使用reentrant 这个关键字?例如: CTYPE.H #ifndef __CTYPE_H__ #define __CTYPE_H__
#pragma SAVE #pragma REGPARMS extern bit isalpha (unsigned char); extern bit isalnum (unsigned char); extern bit iscntrl (unsigned char); extern bit isdigit (unsigned char); extern bit isgraph (unsigned char); extern bit isprint (unsigned char); extern bit ispunct (unsigned char); extern bit islower (unsigned char); extern bit isupper (unsigned char); extern bit isspace (unsigned char); extern bit isxdigit (unsigned char); extern unsigned char tolower (unsigned char); extern unsigned char toupper (unsigned char); extern unsigned char toint (unsigned char);
#define _tolower(c) ( (c)-'A'+'a' ) #define _toupper(c) ( (c)-'a'+'A' ) #define toascii(c) ( (c) & 0x7F ) #pragma RESTORE
#endif 而我自己试着先声明一个函数,没有用reentrant 这个关键字,再到其它地方定义这个函数并使用reentrant 这个关键字,编译的时候就提示重复定义? |