Re: [連結] WeiParserGenerator released under GPLv3
: 推 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
→
11/26 12:21, , 1F
11/26 12:21, 1F
→
11/26 12:22, , 2F
11/26 12:22, 2F
討論串 (同標題文章)
PLT 近期熱門文章
PTT數位生活區 即時熱門文章