__attribute__如何理解?
/*******************************************************************************
* Function Name  : Time_ConvUnixToCalendar(time_t t)
* Description    : 转换UNIX时间戳为日历时间
* Input 		 : u32 t  当前时间的UNIX时间戳
* Output		 : None
* Return		 : struct tm
*******************************************************************************/
struct tm Time_ConvUnixToCalendar(time_t t)
{
	struct tm *t_tm;
	t_tm = localtime(&t);
	t_tm->tm_year += 1900;	//localtime转换结果的tm_year是相对值,需要转成绝对值
	return *t_tm;
}
extern _ARMABI struct tm *localtime(const time_t * /*timer*/) __attribute__((__nonnull__(1)));
localtime实现了时间戳转换为日历时间,其原理是什么?
可能涉及到得知识:EABI,应用程序二进制接口(application binary interface,ABI) 描述了应用程序和操作系统之间,一个应用和它的库之间,或者应用的组成部分之间的低层接口。
相关链接:http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ihi0039d/index.html
 
                    
                
 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号