http://www.lindevdoc.org/wiki/POSIX
Version/part of the spec | IEEE Number | Date of Publication | Contents |
---|---|---|---|
POSIX.1 | 1003.1-1988 | 1988 | Process management, signals, file and directory operations, timers, pipes + the standard ANSI C library |
POSIX.1 edition 1990 | 1003.1-1990 | 1990 | Approved by ISO as ISO/IEC 9945-1:1990 |
Amendment 1b (Real-Time Extensions) | 1003.1b-1993 | 1993 | Priority scheduling, real-time signals, clocks and timers, semaphores, message passing, shared memory, memory locking, asynchronous and synchronous I/O |
Amendment 1c (Thread Extensions) | 1003.1c-1995 | 1995 | POSIX threads API |
POSIX edition 1996 | 1003.1-1996 | 1996 | Approved by ISO as ISO/IEC 9945-1:1996; incorporates amendments 1b, 1c |
POSIX Real-Time Profile | 1003.13-1998 | 1998 | |
Amendment 1d (Additional Realtime Extensions) | 1003.1d-1999 | 1999 | |
POSIX.2 (Shell & Tools, User Portability Extensions) | 1003.2-1999, 1003.2a-1999 | 1999 | |
Amendment 1g (Protocol Independent Interfaces) | 1003.1g-2000 | 2000 | |
Amendment 1j (Advanced Realtime Extensions) | 1003.1j-2000 | 2000 | |
Amendment 1q (Tracing) | 1003.1q-2000 | 2000 | |
POSIX.26 (Device Control APIs) | 1003.26-2000 | 2000 | |
POSIX.1 edition 2001 (also known as SUSv3) | 1003.1-2001 | 2001 | Incorporates amendments 1a, 1d, 1g, 1j, 1q. Merges POSIX.2 into the core standard. Includes the ISO C99 library. |
POSIX.1 Technical Corrigendum 1 (System Interface) | 1003.1-2002 | 2002 | Full text is available |
POSIX.1 Technical Corrigendum 2 (System Interface) | 1003.1-2003 | 2003 | Approved by ISO as ISO/IEC 9945:2003/Cor 1:2004. Full text is available. |
POSIX.1 edition 2004 (also POSIX:2004) | 1003.1-2004 | 2004 | Incorporates corrigenda 1 and 2. Full text is available. |
POSIX.1-2008 (also POSIX:2008, also known as SUSv4) | 1003.1-2008 | 2008 | Full text is available. |
标准c++: statndard c++, C++11,也称为C++0x, ISO/IEC 14882:2011
c++ stl: c++标准模版库
winwodw遵守c/c++ std
http://hi.baidu.com/419836321/item/5af2110d5338e43cf3eafcde
http://www.cnitblog.com/guopingleee/archive/2007/08/13/31701.html
/////////////////////////////////////////////////////////////
crt
////////////////////////////////////////////////////////////
http://www.codeproject.com/KB/cpp/api_crt_cpp_lib_et_al.aspx?display=Mobile
http://www.cnblogs.com/Leo_wl/archive/2011/06/09/2075988.html
windows先开发了crt, 然后在crt的基础上开发了windows api, 然后又在windows api的基础上开发了一些系统相关的crt,如文件和目录,mkdir, 如线程。
基于windows api基础之上的crt,是微软参考unix的posix标准写的,前面加下划线前缀。
例子:CreateDirectory是系统函数,windows api, _mkdir是微软根据posix标准,基于CreateDirectory实现的库函数
http://msdn.microsoft.com/en-us/library/60k1461a(v=vs.80).aspx
vc++ 用到的库: runtime library+standard c/c++
微软一开始用的platform sdk, 后来推出windows sdk.
platform sdk 是开发windows的sdk,包含库和头文件,而crt是它用到的其中的一个库。
类似iphone开发,苹果开放的sdk, 里面又会用到别的库。
iso c标准是为了c语言的可移植性,是语言标准。
posix标准是为了各种unix系统之间的可移植性, 是系统标准。
posix标准包含iso c.
windows有自己的一套标准,当然它也包含iso c.它也很大程度上都参考posix标准。有一些函数如mkdir就是posix标准包含的,但是windows下用_mkdir.
以上这些api都是在windows的crt中。_mkdir内部其实也是调用了windows的makedirectory的系统调用。
综上,为了开发可移植的应用,尽量用crt的api.
#include <stdio.h> /* defines FILENAME_MAX */
#ifdef WINDOWS
#include <direct.h>
#define GetCurrentDir _getcwd
#else
#include <unistd.h>
#define GetCurrentDir getcwd
#endif
char cCurrentPath[FILENAME_MAX];
if (!GetCurrentDir(cCurrentPath,sizeof(cCurrentPath)/sizeof(TCHAR)))
{
return errno;
}
cCurrentPath[sizeof(cCurrentPath)-1]='\0';/* not really required */
printf ("The current working directory is %s", cCurrentPath);
Before Visual C++ 4.2
c runtime library(LIBC.LIB, LIBCMT.LIB, and MSVCRT.LIB)=old iostream library(LIBCI.LIB, LIBCIMT.LIB, MSVCIRT.LIB)+other
after visual c++4.2
c runtime library(LIBC.LIB, LIBCMT.LIB, and MSVCRT.LIB)=stl(LIBCP.LIB, LIBCPMT.LIB, MSVCPRT.LIB)+other,
old iostream func removed from (LIBC.LIB, LIBCMT.LIB, and MSVCRT.LIB).
iosteam header with .h, use old iostream lib, else use stl.
When you build a release version of your project, one of the basic C run-time libraries (LIBC.LIB, LIBCMT.LIB, and MSVCRT.LIB) is linked by default, depending on the compiler option you choose (single-threaded, multithreaded, or DLL). If you include a Standard C++ Library header in your code, a Standard C++ Library will be linked in automatically by Visual C++ at compile time
http://www.tenouk.com/ModuleA.html