Gauche > Archives > 2016/03/23

2016/03/23 00:38:55 UTCenami
#
自分も man ioctl 見てそう思ったのですが、実際のヘッダでは unsigned long int で宣言されているようです。
#
% echo '#include <sys/ioctl.h>' | cc -E - | grep extern
extern int ioctl (int __fd, unsigned long int __request, ...) __attribute__ ((__nothrow__ , __leaf__));
#
上のは ubuntu 14.04 での結果です。
2016/03/23 00:40:31 UTCshiro
#
ありゃ、そりゃドキュメントのバグですね。まあ使われ方からしてもu_longが妥当だと思います。
2016/03/23 00:44:35 UTCenami
#
web で検索すると unsinged long な man page がでてくるので、新しいのでは直ってるのかも。 http://man7.org/linux/man-pages/man2/ioctl.2.html
2016/03/23 00:46:53 UTCshiro
#
ubuntu 14.04でデフォルトでインストールされてるmanpageはフォーマットされた日付が2000-09-21だ。ずいぶん古いなあ。
2016/03/23 22:53:11 UTCshiro
#
厄介そうに見えた問題が案外あっさり解決した。
2016/03/23 23:00:07 UTCshiro
#
上に書いてたpass4の問題のこと