25 Linux下的off_t类型
来源:互联网 发布:mac怎么切换应用程序 编辑:程序博客网 时间:2024/06/16 22:46
off_t类型用于指示文件的偏移量,常就是long类型,其默认为一个32位的整数,在gcc编译中会被编译为long int类型,在64位的Linux系统中则会被编译为long long int,这是一个64位的整数,其定义在unistd.h头文件中可以查看。
242 # ifndef __off_t_defined
243 # ifndef __USE_FILE_OFFSET64
244 typedef __off_t off_t;
245 # else
246 typedef __off64_t off_t;
247 # endif
248 # define __off_t_defined
249 # endif
250 # if defined __USE_LARGEFILE64 && !defined __off64_t_defined
251 typedef __off64_t off64_t;
252 # define __off64_t_defined
253 # endif
329 /* Move FD's file position to OFFSET bytes from the
330 beginning of the file (if WHENCE is SEEK_SET),
331 the current position (if WHENCE is SEEK_CUR),
332 or the end of the file (if WHENCE is SEEK_END).
333 Return the new file position. */
334 #ifndef __USE_FILE_OFFSET64
335 extern __off_t lseek (int __fd, __off_t __offset, int __whence) __THROW;
336 #else
337 # ifdef __REDIRECT_NTH
338 extern __off64_t __REDIRECT_NTH (lseek,
339 (int __fd, __off64_t __offset, int __whence),
340 lseek64);
341 # else
342 # define lseek lseek64
343 # endif
344 #endif
345 #ifdef __USE_LARGEFILE64
346 extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence)
347 __THROW;
348 #endif
242 # ifndef __off_t_defined
243 # ifndef __USE_FILE_OFFSET64
244 typedef __off_t off_t;
245 # else
246 typedef __off64_t off_t;
247 # endif
248 # define __off_t_defined
249 # endif
250 # if defined __USE_LARGEFILE64 && !defined __off64_t_defined
251 typedef __off64_t off64_t;
252 # define __off64_t_defined
253 # endif
329 /* Move FD's file position to OFFSET bytes from the
330 beginning of the file (if WHENCE is SEEK_SET),
331 the current position (if WHENCE is SEEK_CUR),
332 or the end of the file (if WHENCE is SEEK_END).
333 Return the new file position. */
334 #ifndef __USE_FILE_OFFSET64
335 extern __off_t lseek (int __fd, __off_t __offset, int __whence) __THROW;
336 #else
337 # ifdef __REDIRECT_NTH
338 extern __off64_t __REDIRECT_NTH (lseek,
339 (int __fd, __off64_t __offset, int __whence),
340 lseek64);
341 # else
342 # define lseek lseek64
343 # endif
344 #endif
345 #ifdef __USE_LARGEFILE64
346 extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence)
347 __THROW;
348 #endif
0 0
- 25 Linux下的off_t类型
- 关于off_t的小短文
- linux下的类型转换
- Linux 下的信号类型
- linux下命令的类型
- off_t 问题
- off_t undefined
- 检查 Linux 下线程库的类型
- Linux下常用的时间类型
- linux下库文件的类型
- Linux下查看分区的文件系统类型
- Linux下查看一个文件的类型
- 26 Linux下的ssize_t类型
- linux下文件系统类型的学习
- linux下终端的类型(TTY)
- Linux 下文件系统类型
- linux 下文件夹类型
- [Linux]: Linux下如何探测一个文件系统的类型
- IIS7拒绝包含双重转义序列的请求的解决方法
- [学习笔记]二叉树的遍历
- 黑马程序员--基本概念以及基础知识篇
- [学习笔记]二叉树的线索化和遍历
- 编程之美——传话游戏题目与解答
- 25 Linux下的off_t类型
- JSP应用的自我理解之4:JSP+JavaBean设计模式的具体实现
- WebStorm
- 成员初始化列表 初始化同赋值的区别
- 如何快速显示桌面
- 《Java Concurrency in Practice》之发布(Publication)和逸出(escape)
- RPM应用-查询
- vc_runtimeDebug_x64
- Cracking the coding interview--Q19.1