zoukankan      html  css  js  c++  java
  • 系统调用

    以Ubuntu系统中的readdir函数为例。

    一:     #include <dirent.h>

        (dp = opendir(argv[1])) = NULL

        (dirp = readdir(dp)) != NULL

    二:

        在 /usr/include中, dirent.h。

        #include <bits/dirent.h>

        #ifndef __USE_FILE_OFFSET64
          extern struct dirent *readdir (DIR *__dirp) __nonnull ((1));
       #else
       # ifdef __REDIRECT
             extern struct dirent *__REDIRECT (readdir, (DIR *__dirp), readdir64)
             __nonnull ((1));
       # else
       #  define readdir readdir64
       # endif
       #endif

    三:

        在/usr/include/x86_64-linux-gun/bits中 , dirent.h.

        #ifndef _DIRENT_H
       # error "Never use <bits/dirent.h> directly; include <dirent.h> instead."
       #endif

       struct dirent
       {
        #ifndef __USE_FILE_OFFSET64
          __ino_t d_ino;
          __off_t d_off;
        #else
          __ino64_t d_ino;
          __off64_t d_off;
        #endif
          unsigned short int d_reclen;
          unsigned char d_type;
          char d_name[256];       /* We must not include limits.h! */

        };  

  • 相关阅读:
    jdbc在项目中的应用
    第五次作业-springmvc对表单的获取
    jquery的文档处理(部分)
    测试报告怎么写合理
    WebService的简单应用
    hdu--5078--orz
    hdu--5074--dp
    hdu--5108--数论
    hdu--5072--容斥原理
    hdu--3853--概率dp
  • 原文地址:https://www.cnblogs.com/gavinwu/p/3391721.html
Copyright © 2011-2022 走看看