Larry Hastings added the comment:

Lgtm. 

Trent Nelson <rep...@bugs.python.org> wrote:

>
>Trent Nelson added the comment:
>
>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?
>
>----------
>
>_______________________________________
>Python tracker <rep...@bugs.python.org>
><http://bugs.python.org/issue15965>
>_______________________________________

----------
title: AT_FDCWD is 0xffd19553 on Solaris 10, resulting in compiler warnings. -> 
AT_FDCWD is 0xffd19553 on Solaris 10,   resulting in compiler warnings.

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15965>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to