================
@@ -25,6 +26,16 @@
 #define CCSID_UTF_8 1208
 #define CCSID_ISO8859_1 819
 
+#ifndef STDIN_FILENO
+#define STDIN_FILENO 0
+#endif
+#ifndef STDOUT_FILENO
+#define STDOUT_FILENO 1
+#endif
+#ifndef STDERR_FILENO
+#define STDERR_FILENO 2
+#endif
----------------
perry-ca wrote:

I'd suggest moving these to InitLLVM.cpp & raw_ostream.cpp.  They should 
bechecked/ defined after unistd.h is included or we could get into a timing 
problem defining them here.  

Another option is to change the code to use `fileno(stderr)` instead of 
`STDERR_FILENO`.

https://github.com/llvm/llvm-project/pull/143174
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to