On 19/10/10 15:51, Mark Ellis wrote:
> On Tue, 2010-10-19 at 14:02 +0200, Tejas Guruswamy wrote:
>   
>> On 19/10/10 10:06, David Eriksson wrote:
>>     
>>> If I remember correctly, DATE is one of the types in synce_types.h,
>>> which are meant to have the same name and declaration as in Microsoft
>>> Windows. Changing it in libsynce will diverge from that and also means
>>> changing librapi2 and many tools and applications that depend on that
>>> library.
>>>
>>> It would probably be better to hide the Python declaration of DATE
>>> with some #define/#undef magic... :-)
>>>
>>> Best regards,
>>>
>>> David Eriksson
>>> http://www.divideandconquer.se/
>>>       
>> Luckily, the python declaration was just a #define, so it can be #undef'd.
>> This isn't an issue with python2.6 or before, even with gcc 4.5.1, btw.
>>
>> Here's a patch for libsynce that allows building the python rapi2 and
>> rra bindings again.
>>     
> That's remarkably inconvenient of them. Can you see where DATE is
> defined in python, and what it is defined to ? Redefining it is fine for
> our code, but we might break something else in the bindings.
>   
Found it, here's the context:

/usr/include/python2.7/pyconfig.h: 1247:
#define COMPILER "[GCC]"
#define DATE "Aug 07 2010"
#define TIME "16:54:59"

Which is just the python package build info, inserted by configure. I'd
be surprised if anyone is using it to do anything important ...
>> Index: libsynce-0.15/lib/synce_types.h
>> ===================================================================
>> --- libsynce-0.15.orig/lib/synce_types.h
>> +++ libsynce-0.15/lib/synce_types.h
>> @@ -38,6 +38,8 @@ typedef uint64_t  ULARGE_INTEGER;
>>  
>>
>>  /* XXX: sizeof(double) must be 8 */
>> +//Python2.7 defines DATE as a macro in /usr/include/python2.7/pyconfig.h
>> +#undef DATE
>>  typedef double    DATE; 
Regards,
Tejas

------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
SynCE-Devel mailing list
SynCE-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synce-devel

Reply via email to