[issue6820] Redefinition of HAVE_STRFTIME can cause compiler errors.

2011-07-21 Thread rgpitts

rgpitts  added the comment:

As Python 2.6 is now security only and 2.7 is last major release I've patched 
this against Python 3.2 because pyconfig.h hadn't changed much since 2.6.

I've done as Amaury suggested and changed the HAVE_XXX symbols to define 1 like 
autoconf. 'make patchcheck' has fixed some general formatting issues included 
in the patch.

--
keywords: +patch
Added file: http://bugs.python.org/file22710/issue-6820.patch

___
Python tracker 
<http://bugs.python.org/issue6820>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6820] Redefinition of HAVE_STRFTIME can cause compiler errors.

2009-09-02 Thread rgpitts

New submission from rgpitts :

I'm working with the Python C API and omniOrb with Visual Studio 2008 
on Windows XP. 

A OmniOrb header corba_sys_dep.h is defining HAVE_STRFTIME as 1
...
#define HAVE_STRFTIME 1
...

pyconfig.h is then defining this again. 
...
#define HAVE_STRFTIME
...

This is raising a compiler warning and then multiple syntax errors in 
math.h depending on the order of inclusion of these headers. If the 
pyconfig.h is included after corba_sys_dep.h multiple syntax errors. 
However if it is included before only a warning is raised.

I think pyconfig.h needs changing to
#ifndef HAVE_STRFTIME
#define HAVE_STRFTIME
#endif

--
components: Windows
messages: 92159
nosy: rgpitts
severity: normal
status: open
title: Redefinition of HAVE_STRFTIME can cause compiler errors.
type: compile error
versions: Python 2.6

___
Python tracker 
<http://bugs.python.org/issue6820>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9503] print statement hangs Windows service

2010-08-04 Thread rgpitts

New submission from rgpitts :

OS: Windows 2003 Server R2 x64 Standard Edition
Python: 2.6.5
MSVC: 9.0
Application Description: Windows service calling Python C API to run algorithm 
written in Python.

I've been encountering a random application hang when calling the Python C API 
function PyObject_CallMethod to call a function on a class instance. I've 
discovered that the C function fwrite in string_print in stringobject.c is 
blocking after being called multiple times due to print statements in Python 
code. My application as a Windows service does not have a stdout and fwrite is 
buffering data before attempting to write it to a non-existent stdout, thus 
blocking and hanging the service. This isn't an issue when the application has 
a console window because stdout is available.

We are in the process changing the print statements to write to file. Ideally a 
Python exception needs raising if print cannot write to stdout.

--
components: Interpreter Core
messages: 112768
nosy: rgpitts
priority: normal
severity: normal
status: open
title: print statement hangs Windows service
type: behavior
versions: Python 2.6

___
Python tracker 
<http://bugs.python.org/issue9503>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9503] print statement hangs Windows service

2010-08-04 Thread rgpitts

rgpitts  added the comment:

I've created a test service that demostrates the problem. The example service 
calls PyRun_SimpleString in loop that evaluates the Python statement "print 
'String'". The number of iteration in the loop depends on the length of the 
string used in the print statement. The longer the string the fewer iteration.

Attached is a Visual Studio 2008 project and readme.

--
Added file: http://bugs.python.org/file18373/PythonService.zip

___
Python tracker 
<http://bugs.python.org/issue9503>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com