Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-1404

Use S_ISDIR() instead of & S_IFDIR

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.7.0
    • Affects Version/s: None
    • Component/s: None

       [2016/07/18 21:17:47.655] + CFLAGS=-std=c89 -D_POSIX_C_SOURCE=200112L -m64 -march=x86-64 CC=clang ./autogen.sh --enable-html-docs=no --enable-man-pages=no --enable-yelp=no --enable-examples=no --enable-optimizations=no --enable-extra-align=no --enable-maintainer-flags --enable-debug --disable-silent-rules --disable-automatic-init-and-cleanup --with-libbson=bundled --enable-experimental-features
      
      [2016/07/18 21:20:46.937] tests/json-test.c:465:66: error: use of undeclared identifier 'S_IFDIR'
       [2016/07/18 21:20:46.937]       if (0 == stat(child_path, &dir_stat) && dir_stat.st_mode & S_IFDIR) {
       [2016/07/18 21:20:46.937]                                                                  ^
       [2016/07/18 21:20:46.939] 1 error generated.
      

      See https://github.com/mongodb/libbson/commit/98574198d844786d9f5d0d46d351b976842acc16

      tests/ha-test.c:#define S_ISDIR(b) ((b)&_S_IFDIR)
      tests/json-test.c:      if (0 == stat(child_path, &dir_stat) && dir_stat.st_mode & S_IFDIR) {
      

      https://evergreen.mongodb.com/task_log_raw/mongo_c_driver_clang38_debug_compile_c89_f952591a1aaecd0a554521900ed183fae14db8e3_16_07_19_04_14_15/0?type=T

            Assignee:
            bjori Hannes Magnusson
            Reporter:
            bjori Hannes Magnusson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: