Message170649
Easy fix, cast AT_FDCWD to (int):
% hg diff
diff -r 3a880d640981 Modules/posixmodule.c
--- a/Modules/posixmodule.c Tue Sep 18 07:21:18 2012 +0300
+++ b/Modules/posixmodule.c Tue Sep 18 16:04:58 2012 +0000
@@ -414,7 +414,14 @@
#ifdef AT_FDCWD
-#define DEFAULT_DIR_FD AT_FDCWD
+/*
+ * Why the (int) cast? Solaris 10 defines AT_FDCWD as 0xffd19553 (-3041965);
+ * without the int cast, the value gets interpreted as uint (4291925331),
+ * which doesn't play nicely with all the initializer lines in this file that
+ * look like this:
+ * int dir_fd = DEFAULT_DIR_FD;
+ */
+#define DEFAULT_DIR_FD (int)AT_FDCWD
#else
#define DEFAULT_DIR_FD (-100)
#endif
The cast is harmless on other platforms that use an actual integer (rather than a hex representation).
Any objections? |
|
Date |
User |
Action |
Args |
2012-09-18 15:32:07 | trent | set | recipients:
+ trent, larry |
2012-09-18 15:32:07 | trent | set | messageid: <1347982327.53.0.4210648465.issue15965@psf.upfronthosting.co.za> |
2012-09-18 15:32:07 | trent | link | issue15965 messages |
2012-09-18 15:32:06 | trent | create | |
|