JM プロジェクトは、主に Linux 関連のマニュアルページの日本語ページを翻訳・公開しています。
... ンボリックリンクの内容を格納するのに十分な領域がない場合がある。 バッファーに必要なサイズは、 そのシンボリックリンクに対して lstat (2) の呼び出しで返される stat.st_size の値から取得できる。 ただし、 readlink () や readlinkat () が書き込んだバイト数をチェ ... 構成する。 例 The following program allocates the buffer needed by readlink () dynamically from the information provided by lstat (2), falling back to a buffer of size PATH_MAX in cases where lstat (2) reports a size of zero. #include < sys/types.h > # ... uf; ssize_t nbytes, bufsiz; if (argc != 2) { fprintf(stderr, "Usage: %s <pathname>\n", argv[0]); exit(EXIT_FAILURE); } if (lstat(argv[1], &sb) == -1) { perror("lstat"); exit(EXIT_FAILURE); } /* Add one to the link size, so that we can determine whethe ... ... ンボリックリンクの内容を格納するのに十分な領域がない場合がある。 バッファーに必要なサイズは、 そのシンボリックリンクに対して lstat (2) の呼び出しで返される stat.st_size の値から取得できる。 ただし、 readlink () や readlinkat () が書き込んだバイト数をチェ ... 構成する。 例 The following program allocates the buffer needed by readlink () dynamically from the information provided by lstat (2), falling back to a buffer of size PATH_MAX in cases where lstat (2) reports a size of zero. #include < sys/types.h > # ... uf; ssize_t nbytes, bufsiz; if (argc != 2) { fprintf(stderr, "Usage: %s <pathname>\n", argv[0]); exit(EXIT_FAILURE); } if (lstat(argv[1], &sb) == -1) { perror("lstat"); exit(EXIT_FAILURE); } /* Add one to the link size, so that we can determine whethe ... ... pathname , struct stat * buf ); int fstat(int fd , struct stat * buf ); int lstat(const char * pathname , struct stat * buf ); #include < fcntl.h > /* AT_* 定数の定義 */ #include < sys/stat.h > int fstata ... const char * pathname , struct stat * buf , int flags ); glibc 向けの機能検査マクロの要件 ( feature_test_macros (7) 参照): lstat (): /* glibc 2.19 以前 */ _BSD_SOURCE || /* glibc 2.20 以降 */_DEFAULT_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && ... 情報を stat が指すバッファーに格納して返す。 ファイルそのものに対するアクセス許可は必要としないが、 --- stat (), fstatat (), lstat () の場合には ---そのファイルへ至る pathname を構成する全てのディレクトリに対する実行 (検索) 許可が必要である。 stat () と ... ... pathname , struct stat * buf ); int fstat(int fd , struct stat * buf ); int lstat(const char * pathname , struct stat * buf ); #include < fcntl.h > /* AT_* 定数の定義 */ #include < sys/stat.h > int fstata ... const char * pathname , struct stat * buf , int flags ); glibc 向けの機能検査マクロの要件 ( feature_test_macros (7) 参照): lstat (): /* glibc 2.19 以前 */ _BSD_SOURCE || /* glibc 2.20 以降 */_DEFAULT_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && ... 情報を stat が指すバッファーに格納して返す。 ファイルそのものに対するアクセス許可は必要としないが、 --- stat (), fstatat (), lstat () の場合には ---そのファイルへ至る pathname を構成する全てのディレクトリに対する実行 (検索) 許可が必要である。 stat () と ... ... pathname , struct stat * buf ); int fstat(int fd , struct stat * buf ); int lstat(const char * pathname , struct stat * buf ); #include < fcntl.h > /* AT_* 定数の定義 */ #include < sys/stat.h > int fstata ... const char * pathname , struct stat * buf , int flags ); glibc 向けの機能検査マクロの要件 ( feature_test_macros (7) 参照): lstat (): /* glibc 2.19 以前 */ _BSD_SOURCE || /* glibc 2.20 以降 */_DEFAULT_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && ... 情報を stat が指すバッファーに格納して返す。 ファイルそのものに対するアクセス許可は必要としないが、 --- stat (), fstatat (), lstat () の場合には ---そのファイルへ至る pathname を構成する全てのディレクトリに対する実行 (検索) 許可が必要である。 stat () と ... ... pathname , struct stat * buf ); int fstat(int fd , struct stat * buf ); int lstat(const char * pathname , struct stat * buf ); #include < fcntl.h > /* AT_* 定数の定義 */ #include < sys/stat.h > int fstata ... const char * pathname , struct stat * buf , int flags ); glibc 向けの機能検査マクロの要件 ( feature_test_macros (7) 参照): lstat (): /* glibc 2.19 以前 */ _BSD_SOURCE || /* glibc 2.20 以降 */_DEFAULT_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && ... 情報を stat が指すバッファーに格納して返す。 ファイルそのものに対するアクセス許可は必要としないが、 --- stat (), fstatat (), lstat () の場合には ---そのファイルへ至る pathname を構成する全てのディレクトリに対する実行 (検索) 許可が必要である。 stat () と ... ... pathname , struct stat * buf ); int fstat(int fd , struct stat * buf ); int lstat(const char * pathname , struct stat * buf ); #include < fcntl.h > /* AT_* 定数の定義 */ #include < sys/stat.h > int fstata ... const char * pathname , struct stat * buf , int flags ); glibc 向けの機能検査マクロの要件 ( feature_test_macros (7) 参照): lstat (): /* glibc 2.19 以前 */ _BSD_SOURCE || /* glibc 2.20 以降 */_DEFAULT_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && ... 情報を stat が指すバッファーに格納して返す。 ファイルそのものに対するアクセス許可は必要としないが、 --- stat (), fstatat (), lstat () の場合には ---そのファイルへ至る pathname を構成する全てのディレクトリに対する実行 (検索) 許可が必要である。 stat () と ... ... pathname , struct stat * buf ); int fstat(int fd , struct stat * buf ); int lstat(const char * pathname , struct stat * buf ); #include < fcntl.h > /* AT_* 定数の定義 */ #include < sys/stat.h > int fstata ... const char * pathname , struct stat * buf , int flags ); glibc 向けの機能検査マクロの要件 ( feature_test_macros (7) 参照): lstat (): /* glibc 2.19 以前 */ _BSD_SOURCE || /* glibc 2.20 以降 */_DEFAULT_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && ... 情報を stat が指すバッファーに格納して返す。 ファイルそのものに対するアクセス許可は必要としないが、 --- stat (), fstatat (), lstat () の場合には ---そのファイルへ至る pathname を構成する全てのディレクトリに対する実行 (検索) 許可が必要である。 stat () と ... ... pathname , struct stat * buf ); int fstat(int fd , struct stat * buf ); int lstat(const char * pathname , struct stat * buf ); #include < fcntl.h > /* AT_* 定数の定義 */ #include < sys/stat.h > int fstata ... const char * pathname , struct stat * buf , int flags ); glibc 向けの機能検査マクロの要件 ( feature_test_macros (7) 参照): lstat (): /* glibc 2.19 以前 */ _BSD_SOURCE || /* glibc 2.20 以降 */_DEFAULT_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && ... 情報を stat が指すバッファーに格納して返す。 ファイルそのものに対するアクセス許可は必要としないが、 --- stat (), fstatat (), lstat () の場合には ---そのファイルへ至る pathname を構成する全てのディレクトリに対する実行 (検索) 許可が必要である。 stat () と ... ... pathname , struct stat * buf ); int fstat(int fd , struct stat * buf ); int lstat(const char * pathname , struct stat * buf ); #include < fcntl.h > /* AT_* 定数の定義 */ #include < sys/stat.h > int fstata ... const char * pathname , struct stat * buf , int flags ); glibc 向けの機能検査マクロの要件 ( feature_test_macros (7) 参照): lstat (): /* glibc 2.19 以前 */ _BSD_SOURCE || /* glibc 2.20 以降 */_DEFAULT_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && ... 情報を stat が指すバッファーに格納して返す。 ファイルそのものに対するアクセス許可は必要としないが、 --- stat (), fstatat (), lstat () の場合には ---そのファイルへ至る pathname を構成する全てのディレクトリに対する実行 (検索) 許可が必要である。 stat () と ... 日本語の文書やマニュアルを配布している個人/プロジェクトへのリンクです。