作者godfat (godfat 真常)
看板PLT
标题Re: [连结] WeiParserGenerator released under GPLv3
时间Mon Nov 26 11:23:15 2007
: 推 halajohn:恩, wcscpy_s 这类 _s 的 function, 是定义在 11/26 09
: → halajohn:ISO/IEC TR 24731 中, 这些 function 的规范更严谨, 11/26 09
: → halajohn:好处也更多. 我当初也很惊讶 VC2005 实现了这套. 11/26 09
: → halajohn:不只 vc2005 有, openwatcom 1.5 以後也都有. 11/26 09
: → halajohn:这算是 c library 的 extension. 跟 compiler 没关. 11/26 09
: → halajohn:要怪就怪 glibc 怎麽进度这麽慢吧. 11/26 09
: → halajohn:anyway, 要改回没有 _s 的方法比加上 _s 还要来的简单. 11/26 09
: → godfat:可以考虑回文 @@; 翻了一下,dinkumware 好像也没做... 11/26 10
: → godfat:改天再查查看有谁做好了 @@ 11/26 10
说是改天不过好奇起来就查了 :o
ISO/IEC TR 24731
Abstract
ISO/IEC TR 24731-1:2007 provides alternative functions for the C Library
(as defined in ISO/IEC 9899:1999) that promote safer, more
secure programming. The functions verify that output buffers are
large enough for the intended result, and return a failure indicator
if they are not. Optionally, failing functions call a
"runtime-constraint handler" to report the error. Data is never written
past the end of an array. All string results are null terminated.
In addition, the functions in ISO/IEC TR 24731-1:2007 are re-entrant:
they never return pointers to static objects owned by the function.
ISO/IEC TR 24731-1:2007 also contains functions that address insecurities
with the C input-output facilities.
好像是今年八月出版的?其实我觉得说这是标准也没错啦,只是... XD
不清楚 C 有没有像 C++ 的 boost 那种东西?boost 就有做半套 TR1,
总比完全没有好 :o
习惯把标准看成 C99, C++98, C++03 等... 所以没想到 TR
and dinkumware 似乎有以下 TR:
<hardware> [added with TR18015] --
for writing portable I/O hardware drivers in C++
<iohw.h> [added with TR18015/TR18037] --
for writing portable I/O hardware drivers in C
<stdfix.h> [added with TR18037] --
for performing fixed-point arithmetic in C
<uchar.h> [added with TR19769] --
for manipulating 16-bit and 32-bit Unicode wide characters in C
还有 C++ 社群俗称的 TR1...
不知道全部有多少个? :o
--
生死去来、棚头傀儡、一线断时、落落磊磊
《花镜》-世阿弥
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 61.218.90.242
1F:→ godfat:好像只有 open watcom 和 msvc 8+ 有做的样子... 11/26 12:21
2F:→ godfat:没记错的话 open watcom 也是 win32 的... 11/26 12:22