西城

指尖代码,手上年华

联系 聚合 管理
  20 Posts :: 0 Stories :: 62 Comments :: 0 Trackbacks
cgicc是一个C++的cgi库。
这个头文件里主要定义了一些平台相关的宏定义。

#if HAVE_CONFIG_H
# include "config.h"
#endif

我的版本里有config.h这个文件。内容:

/* Name of package. */
#define PACKAGE "cgicc"

/* Version of package. */
#define VERSION "3.2"

/* System cgicc was configured for */
#define HOST "i686-pc-linux-gnu"

/* Whether to enable debug logging */
#define DEBUG 0

/* Define if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1

/* Define if you have the `gettimeofday' function. */
#define HAVE_GETTIMEOFDAY 1

/* Define if you have the `strftime' function. */
#define HAVE_STRFTIME 1

/* Define if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1

/* Define if you have the `uname' function. */
#define HAVE_UNAME 1

/* Name of package */
#define PACKAGE "cgicc"

/* Define if you have the ANSI C header files. */
#define STDC_HEADERS 1

/* Define if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1

/* Define if your <sys/time.h> declares `struct tm'. */
/* #undef TM_IN_SYS_TIME */

/* Version number of package */
#define VERSION "3.2"

主要是一些配置信息,是在编译时生成的。Cgicc这个类里面提供了一些API用来获取这些信息,感觉没什么实际用处。
WIN32那快略去,只看LINUX部分的。

# define CGICC_USE_NAMESPACES 1
# define CGICC_API

这两个宏在其他文件里用的很多,所以要注意一下,CGICC_API为空,LINUX版的很多类定义前都
有它,只要忽略它就醒了。

 

#if CGICC_USE_NAMESPACES
# define CGICC_BEGIN_NAMESPACE namespace cgicc {
# define CGICC_END_NAMESPACE }
# define CGICCNS cgicc::
# define STDNS std::

其他常用的宏。感觉主要的作用还是为了一种明显的标示。使逻辑结构更清楚一些。

posted on 2012-03-24 23:15 西城 阅读(640) 评论(0)  编辑 收藏 引用 所属分类: Cgicc

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理