JM Project

JM プロジェクトは、主に Linux 関連のマニュアルページの日本語ページを翻訳・公開しています。

Linux マニュアル 一覧

全文・高度検索

per page, with , order by , clip by
Results of 1 - 5 of about 5 for offsetof (0.002 sec.)
Man page of OFFSETOF 12832
OFFSETOF Section: Linux Programmer's Manual (3) Updated: 2020-11-01 Index JM Home Page 名前 offsetof - 構造体のメンバーのオフセットを返す 書式 #include < stddef.h > size_t offsetof( type , member ); 説明 offsetof () マクロは、フィールド mem ... い。 member がバイト境界に位置していない場合 (すなわち、ビットフィールドの場合) には、 コンパイラでエラーが発生する。 返り値 offsetof () は、指定された member の指定された type の中でのオフセットを、バイト単位で返す。 準拠 POSIX.1-2001, POSIX.1-2008, C89, ... s { int i; char c; double d; char a[]; }; /* 出力はコンパイラ依存である */ printf("offsets: i=%zu; c=%zu; d=%zu a=%zu\n", offsetof(struct s, i), offsetof(struct s, c), offsetof(struct s, d), offsetof(struct s, a)); printf("sizeof(struct s)=%zu\n", sizeo ...
https://man.mtool.work/man/20260915/man3/offsetof.3.html
Man page of UNIX 8640
UNIX Section: Linux Programmer's Manual (7) Updated: 2020-11-01 Index JM Home Page 名前 unix - ローカルな プロセス間通信用のソケット 書式 #include < sys/socket.h > #include < sys/un.h > unix_socket = socket(AF_UNIX, type, 0); error = socket ... テム上のパス名に結び付けることができる。 (上述のいずれかのシステムコールにより) ソケットのアドレスが返される際、 その長さは offsetof(struct sockaddr_un, sun_path) + strlen(sun_path) + 1 であり、 sun_path にはヌル終端されたパス名が格納される。 (Linux では、 ... 上記の offsetof () 式は sizeof(sa_family_t) の値と同じだが、 他の実装では sun_path の前に他のフィールドが含まれる場合もある。 そのため、 o ... の大きさを超えないようにすべきである。 * sockaddr_un 構造体の終わりを示す addrlen 引数は最低でも以下の値を持つべきである。 offsetof(struct sockaddr_un, sun_path)+strlen(addr.sun_path)+1 もしくは、もっと簡単には、 addrlen に sizeof(struct sockaddr_un) を指 ...
https://man.mtool.work/man/20260915/man7/unix.7.html
Man page of GETDENTS 8162
GETDENTS Section: Linux Programmer's Manual (2) Updated: 2020-11-01 Index JM Home Page 名前 getdents, getdents64 - ディレクトリエントリーを取得する 書式 long getdents(unsigned int fd , struct linux_dirent * dirp , unsigned int count ); #def ... d_reclen; /* この linux_dirent の長さ */ char d_name[]; /* (ヌル終端された) ファイル名 */ /* 実際の長さは (d_reclen - 2 - offsetof(struct linux_dirent, d_name)) */ /* char pad; // 値 0 のパディングバイト char d_type; // ファイル種別 (Linux 2.6.4 以降のみ ...
https://man.mtool.work/man/20260915/man2/getdents.2.html
Man page of GETDENTS 8162
GETDENTS Section: Linux Programmer's Manual (2) Updated: 2020-11-01 Index JM Home Page 名前 getdents, getdents64 - ディレクトリエントリーを取得する 書式 long getdents(unsigned int fd , struct linux_dirent * dirp , unsigned int count ); #def ... d_reclen; /* この linux_dirent の長さ */ char d_name[]; /* (ヌル終端された) ファイル名 */ /* 実際の長さは (d_reclen - 2 - offsetof(struct linux_dirent, d_name)) */ /* char pad; // 値 0 のパディングバイト char d_type; // ファイル種別 (Linux 2.6.4 以降のみ ...
https://man.mtool.work/man/20260915/man2/getdents64.2.html
Man page of READDIR 8107
READDIR Section: Linux Programmer's Manual (3) Updated: 2019-03-06 Index JM Home Page 名前 readdir - ディレクトリを読み込む 書式 #include < dirent.h > struct dirent *readdir(DIR * dirp ); 説明 readdir () 関数は、 dirp が指すディレクトリスト ... 上記の glibc dirent 構造体のサイズよりも大きな値となる。 関連項目 getdents (2), read (2), closedir (3), dirfd (3), ftw (3), offsetof (3), opendir (3), readdir_r (3), rewinddir (3), scandir (3), seekdir (3), telldir (3) この文書について この man ページは L ...
https://man.mtool.work/man/20260915/man3/readdir.3.html
PREV 1 NEXT

リンク

日本語の文書やマニュアルを配布している個人/プロジェクトへのリンクです。