[PATCH] Add a libc-independent sanitizer_common for Linux/x86_64.

Reid Kleckner rnk at google.com
Wed Apr 10 13:11:54 PDT 2013



================
Comment at: lib/sanitizer_common/sanitizer_common.h:116
@@ -115,3 +115,3 @@
 
-fd_t OpenFile(const char *filename, bool write);
+uptr OpenFile(const char *filename, bool write);
 // Opens the file 'file_name" and reads up to 'max_len' bytes.
----------------
The vast majority of this change is the fd_t rename, and it probably needs more motivation in the change description.

First, is fd_t pointer sized?  Generally Linux fds are 32-bit ints.  I don't know about other platforms.

Second, is it unreasonable to provide our own typedef for fd_t in sanitizer_common.h if we can't get fd_t from the system somehow?


http://llvm-reviews.chandlerc.com/D654



More information about the llvm-commits mailing list