hp Unix 上 union semun编译不过的问题解决
来源:互联网 发布:北医李睿 知乎 编辑:程序博客网 时间:2024/05/17 22:18
Linux环境进程间通信(四)信号灯
http://www.ibm.com/developerworks/cn/linux/l-ipc/part4/
今天对文中的例子进行了编译,发现 union semun编译不过,经过调查发现sem.h中竟然把声明给注释掉了。
所以需要自己追加对union semun 定义。
union semun
{
int val;
struct semid_ds *buf;
unsigned short int *array;
struct seminfo *__buf;
};
还有
arg.__buf->semmap
->
修正为 arg.__buf->pad。
我们可以看看sem.h中部分定义如下:
/* The fourth argument to semctl() is optional and varies depending
* on the value of its first argument. If required, it is of type
* "union semun" which the application program must explicitly declare:
*
* union semun { 被注释掉了
* int val;
* struct semid_ds *buf;
* unsigned short *array;
* } arg
还有seminfo 的定义如下
/*
** semaphore information structure
*/
struct seminfo {
int pad; /* pad field to replace obsolete semmap of SysV */ 是pad哦
int semmni; /* # of semaphore identifiers */
int semmns; /* # of semaphores in system */
int semmnu; /* # of undo structures in system */
int semmsl; /* max # of semaphores per ID */
int semopm; /* max # of operations per semop call */
int semume; /* max # of undo entries per process */
int semusz; /* size in bytes of undo structure */
int semvmx; /* semaphore maximum value */
int semaem; /* adjust on exit max value */
};
- hp Unix 上 union semun编译不过的问题解决
- 在hp-unix上编译ACT_TAO出错
- 关于zhtread编译不过的问题解决办法
- hp-unix 编译openssh
- cocos2dx 3.0 编译不过问题解决
- UNIX环境高级编程官方源码编译不过的修改
- 使用muduo-0.9.3的程序编译不过的问题解决
- HP-UNIX上安装磁带库
- 在HP-Unix上部署J2EE应用程序的小结
- 在HP-Unix上部署J2EE应用程序的小结
- HP-UNIX File System&Storage 的一些基本知识(上)
- oracle在Hp-unix上的自动启动
- 在HP-Unix上部署J2EE应用程序的小结
- 4.0Release上编译通不过的解决方法
- coreplot 在iOS6编译不过问题解决
- HP 上编译的32位64位问题
- HP-UNIX逻辑盘卷管理(上)
- 关于HP-Unix的视频
- 红旗2000联手BenQ,打造MID办公软件定制化
- Windows API SHGetSpecialFolderPath的用法 ,获取特殊文件夹
- Linux下C编程入门笔记——文件IO操作(一)
- 《中小企业管理与科技》约稿函
- Love idioms 爱之习语
- hp Unix 上 union semun编译不过的问题解决
- 点“删除”时,弹出“你是否确定要删除?”,确定后删除,取消后返回.
- CListCtrl::SortItems的用法
- 敏捷SOA成功之秘诀五:IT和SOA治理
- 武汉江汉路附近的酒店,武汉江汉路附近的酒店
- 加班时间这么短深感惭愧
- 电脑系统端口设置合理参数值
- 浅谈C中的malloc和free
- Oracle 时间函数