[PATCH] D58801: [Support] Implement is_local_impl with AIX mntctl

Hubert Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 6 21:40:48 PST 2019


hubert.reinterpretcast marked 3 inline comments as done.
hubert.reinterpretcast added inline comments.


================
Comment at: lib/Support/Unix/Path.inc:81
+#include <sys/statfs.h>
+typedef uint_t uint;
+#include <sys/vmount.h>
----------------
apaprocki wrote:
> hubert.reinterpretcast wrote:
> > apaprocki wrote:
> > > `sys/statfs.h` includes `sys/types.h`, which contains this `typedef`. Was there a reason why it was put here between the two headers?
> > Yes, the header is defective. It needs a typedef that is only conditionally defined.
> I guess I am not seeing that.. is it OS version dependent?
> 
> 
> ```
> $ cat test.c
> #include <sys/statfs.h>
> #include <sys/vmount.h>
> $ xlc -E -c test.c | grep "typedef.*uint;"
> typedef         uint_t          uint;
> $
> ```
Try with `-D_XOPEN_SOURCE=700` or anything that suppresses `_ALL_SOURCE`:
```
> xlclang -D_XOPEN_SOURCE=700 test.c -c
In file included from test.c:2:
/usr/include/sys/vmount.h:195:2: error: unknown type name 'uint'; did you mean 'int'?
        uint    vmt_revision;   /* I revision level, currently 1        */
        ^
/usr/include/sys/vmount.h:196:2: error: unknown type name 'uint'; did you mean 'int'?
        uint    vmt_length;     /* I total length of structure and data */
        ^
/usr/include/sys/vmount.h:203:2: error: unknown type name 'uint'; did you mean 'int'?
        uint    vmt_time;       /* O time of mount                      */
        ^
/usr/include/sys/vmount.h:204:2: error: unknown type name 'uint'; did you mean 'int'?
        uint    vmt_timepad;    /* O (in future, time is 2 longs)       */
        ^
4 errors generated.
Error while processing test.c.
Return:  0x01:1
```


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58801/new/

https://reviews.llvm.org/D58801





More information about the llvm-commits mailing list