开发工具:
文件大小: 66kb
下载次数: 0
上传时间: 2015-10-10
详细说明: Posix多线程程序设计书中实例源码。 头文件errors.h #ifndef __errors_h #define __errors_h #include #include #include #include #include /* * Define a macro that can be used for diagnostic output from * examples. When compiled -DDEBUG, it results in calling printf * with the specified argument list. When DEBUG is not defined, it * expands to nothing. */ #ifdef DEBUG # define DPRINTF(arg) printf arg #else # define DPRINTF(arg) #endif /* * NOTE: the "do {&q uot; ... "} while (0);" bracketing around the macros * allows the err_abort and errno_abort macros to be used as if they * were function calls, even in contexts where a trailing ";" would * generate a null statement. For example, * * if (status != 0) * err_abort (status, "message"); * else * return status; * * will not compile if err_abort is a macro ending with "}", because * C does not expect a ";" to follow the "}". Because C does expect * a ";" following the ")" in the do...while construct, err_abort and * errno_abort can be used as if they were function calls. */ #define err_abort(code,text) do { \ fprintf (stderr, "%s at \"%s\":%d: %s\n", \ text, __FILE__, __LINE__, strerror (code)); \ abort (); \ } while (0) #define errno_abort(text) do { \ fprintf (stderr, "%s at \"%s\":%d: %s\n", \ text, __FILE__, __LINE__, strerror (errno)); \ abort (); \ } while (0) #endif ...展开收缩
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.