[Python-Dev] Current CVS version of sysmodule.c fails to compile

Greg Stein gstein@lyra.org
Thu, 11 Jan 2001 01:28:16 -0800


You're quite right! I've checked in a change, renaming it to "outf".

Cheers,
-g

On Thu, Jan 11, 2001 at 05:08:29PM +0800, Mark Favas wrote:
> On Tru64 Unix, with Compaq's C/CXX compilers, the current CVS version of
> sysmodule.c produces the following errors:
> 
> cc -O -Olimit 1500 -I./../Include -I.. -DHAVE_CONFIG_H   -c -o
> sysmodule.o sysmodule.c
> cc: Error: sysmodule.c, line 73: Invalid declarator. (declarator)
>         PyObject *o, *stdout;
> ----------------------^
> cc: Error: sysmodule.c, line 79: In this statement, "o" is not declared.
> (undeclared)
>         if (!PyArg_ParseTuple(args, "O:displayhook", &o))
> ------------------------------------------------------^
> cc: Error: sysmodule.c, line 93: In this statement, "(&_iob[1])" is not
> an lvalue, but occurs in a context that requires one. (needlvalue)
>         stdout = PySys_GetObject("stdout");
> --------^
> cc: Warning: sysmodule.c, line 98: In this statement, the referenced
> type of the pointer value "(&_iob[1])" is "struct declared without a
> tag", which is not compatible with "struct _object". (ptrmismatch)
>         if (PyFile_WriteObject(o, stdout, 0) != 0)
> ----------------------------------^
> cc: Warning: sysmodule.c, line 100: In this statement, the referenced
> type of the pointer value "(&_iob[1])" is "struct declared without a
> tag", which is not compatible with "struct _object". (ptrmismatch)
>         PyFile_SoftSpace(stdout, 1);
> -------------------------^
> 
> The problem is that stdout is a macro #define'd in stdio.h as (&_iob[1])
> (stdin and stderr also are similarly #define'd).
> 
> -- 
> Mark Favas  -   m.favas@per.dem.csiro.au
> CSIRO, Private Bag No 5, Wembley, Western Australia 6913, AUSTRALIA
> 
> _______________________________________________
> Python-Dev mailing list
> Python-Dev@python.org
> http://www.python.org/mailman/listinfo/python-dev

-- 
Greg Stein, http://www.lyra.org/