- 4
- 0
- 约2.94千字
- 约 3页
- 2017-06-12 发布于北京
- 举报
size_t和ssize_t的含义和区别
stddef.h
C 语言头文件。
作用:定义/声明了一些经常使用的常数,类型和变量
VC 中stddef.h 的内容:
/***
*stddef.h - definitions/declarations for common constants,
types, variables
*
* Copyright (c) 1985-1997, Microsoft Corporation. All rights
reserved.
*
*Purpose:
* This file contains definitions and declarations for some
commonly
* used constants, types, and variables.
* [ANSI]
*
* [Public]
*
****/
#if _MSC_VER 1000
#pragma once
#endif
#ifndef _INC_STDDEF
#define _INC_STDDEF
#if !defined(_WIN32) !defined(_MAC)
#error ERROR: Only Mac or Win32 targets supported!
#endif
#ifdef __cplusplus
extern C {
#endif
/* Define _CRTIMP */
#ifndef _CRTIMP
#ifdef _DLL
#define _CRTIMP __declspec(dllimport)
#else /* ndef _DLL */
#define _CRTIMP
#endif /* _DLL */
#endif /* _CRTIMP */
/* Define __cdecl for non-Microsoft compilers */
#if ( !defined(_MSC_VER) !defined(__cdecl) )
#define __cdecl
#endif
/* Define _CRTAPI1 (for compatibility with the NT SDK) */
#ifndef _CRTAPI1
#if _MSC_VER = 800 _M_IX86 = 300
#define _CRTAPI1 __cdecl
#else
#define _CRTAPI1
#endif
#endif
/* Define NULL pointer value and the offset() macro */
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#define offsetof(s,m) (size_t)(((s *)0)-m)
/* Declare reference to errno */
#if (defined(_MT) || defined(_DLL)) !defined(_MAC)
_CRTIMP extern int * __cdecl _errno(void);
#define errno (*_errno())
#else /* ndef _MT ndef _DLL */
_CRTIMP extern int errno;
#endif /* _MT || _DLL */
/* define the implementation dependent size types */ //定义依赖于实现规模类型
#ifndef _PTRDIFF_T_DEFINED
typedef int ptrdiff_t;
#define _PTRDIFF_T_DEFINED
#endif
#ifndef _SIZE_T_DEFINED
typedef unsigned int size_t;
#define _SIZE_T_DEFINED
#endif
#ifndef _WCHAR_T_DEFINED
typedef unsigned short wchar_t;
#define _WCHAR_T_DEFINED
#endif
#ifdef _MT
_CRTIMP extern unsigned long __cdecl __threadid(void);
#define _threadid (__threadid())
_CRTIMP extern unsigned long __cdecl __threadhandle(void);
#endif
#ifdef __cplusplus
}
#endif
#endif
您可能关注的文档
- S.H.E歌词女生宿舍.doc
- S6LOL战争之影人马打野出装顺序,S6人马打野天赋加点.doc
- S6LOL虚空掠夺者打野天赋加点,S6螳螂卡兹克攻略.doc
- S6卡特中单天赋加点lolS6不祥之刃出装顺序对线技巧.doc
- S6英雄联盟LOL皇子打野出装符文天赋加点攻略.doc
- SA120W型螺杆式空气压缩机安全操作规程.doc
- SAT考前必背高频词(51-100).doc
- Sayatoo卡拉字幕精灵破解教程.doc
- sch和壁厚对照表.doc
- Scratch贪吃蛇游戏制作笔记.doc
- 2025年房地产业务员工作总结(五篇).docx
- 2025年教育班总结(十六篇).docx
- 2025四川自贡市第一人民医院招聘医疗辅助岗人员12人笔试参考试题附答案解析.docx
- 2025年期末考试总结样本两篇(十五篇).docx
- 2025四川自贡市第一人民医院安保人员招聘10人备考题库附答案解析.docx
- 2025四川自贡市第一人民医院招聘食堂工人17人备考试题附答案解析.docx
- 2025四川科瑞软件有限责任公司招聘法务主管等岗位2人参考试题附答案解析.docx
- 2025四川泸州市西南医科大学附属口腔医院人员招聘2人备考历年题库含答案解析(夺冠).docx
- 2025四川泸州福欣医院招聘3人笔试历年题库附答案解析.docx
- 2025四川绵阳市爱创科技有限公司变频与控制事业部招聘运营管理岗位1人笔试题库附答案解析.docx
原创力文档

文档评论(0)