Re: SunStudio compile

2008-08-25 Thread Matej Vela
Michael Ströder <[EMAIL PROTECTED]> writes:

> I will commit this change.

Thanks.

> Please also examine
>
> http://python-ldap.cvs.sourceforge.net/python-ldap/python-ldap/Modules/LDAPObject.c?r1=1.79&r2=1.80
>
> http://python-ldap.cvs.sourceforge.net/python-ldap/python-ldap/Modules/options.c?r1=1.19&r2=1.20

Both look good.

Cheers,

Matej

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev


Re: SunStudio compile

2008-08-25 Thread Michael Ströder
Matej Vela wrote:
> Yup.  If you haven't already, try replacing lines 614 and 615
> 
> sasl_interact_t *interact = in;
> PyObject *SASLObject = defaults;
> 
> with
> 
> sasl_interact_t *interact = (sasl_interact_t *) in;
> PyObject *SASLObject = (PyObject *) defaults;

I will commit this change.

Please also examine

http://python-ldap.cvs.sourceforge.net/python-ldap/python-ldap/Modules/LDAPObject.c?r1=1.79&r2=1.80

http://python-ldap.cvs.sourceforge.net/python-ldap/python-ldap/Modules/options.c?r1=1.19&r2=1.20

Ciao, Michael.

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev


Re: SunStudio compile

2008-08-25 Thread Matej Vela
Anil <[EMAIL PROTECTED]> writes:

> Thanks, that worked! I am able to compile it now, but if I enable sasl, 
> it also fails:
>
> "Modules/LDAPObject.c", line 568: Warning: String literal converted to 
> char* in formal argument format in call to 
> _PyObject_CallMethod_SizeT(_object*, char*, char*, ...).
> "Modules/LDAPObject.c", line 614: Error: Cannot use void* to initialize 
> sasl_interact*.
> "Modules/LDAPObject.c", line 615: Error: Cannot use void* to initialize 
> _object*.
> "Modules/LDAPObject.c", line 689: Warning (Anachronism): Formal argument 
> proc of type extern "C" int(*)(ldap*,unsigned,void*,void*) in call to 
> ldap_sasl_interactive_bind_s(ldap*, const char*, const char*, 
> ldapcontrol**, ldapcontrol**, unsigned, extern "C" 
> int(*)(ldap*,unsigned,void*,void*), void*) is being passed 
> int(*)(ldap*,unsigned,void*,void*).
>
> Sounds like the same thing.

Yup.  If you haven't already, try replacing lines 614 and 615

sasl_interact_t *interact = in;
PyObject *SASLObject = defaults;

with

sasl_interact_t *interact = (sasl_interact_t *) in;
PyObject *SASLObject = (PyObject *) defaults;

(Sorry for the late reply.)

Cheers,

Matej

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev


Re: SunStudio compile

2008-08-25 Thread Matej Vela
Michael Ströder <[EMAIL PROTECTED]> writes:

> Matej Vela wrote:
>> The type checking seems to be a bit overzealous.  Try changing line 108
>> of Modules/options.c from
>> 
>> LDAPControl_List_DEL(ptr);
>> 
>> to
>> 
>> LDAPControl_List_DEL((LDAPControl**) ptr);
>
> Matej, do you think we should change this in general?

Yes, can't hurt (though most compilers are fine with both).

Cheers,

Matej

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev


Re: SunStudio compile

2008-08-22 Thread Michael Ströder
Anil wrote:
> Thanks, that worked! I am able to compile it now, but if I enable sasl, 
> it also fails:
> 
> "Modules/LDAPObject.c", line 568: Warning: String literal converted to 
> char* in formal argument format in call to 
> _PyObject_CallMethod_SizeT(_object*, char*, char*, ...).
> "Modules/LDAPObject.c", line 614: Error: Cannot use void* to initialize 
> sasl_interact*.
> "Modules/LDAPObject.c", line 615: Error: Cannot use void* to initialize 
> _object*.
> "Modules/LDAPObject.c", line 689: Warning (Anachronism): Formal argument 
> proc of type extern "C" int(*)(ldap*,unsigned,void*,void*) in call to 
> ldap_sasl_interactive_bind_s(ldap*, const char*, const char*, 
> ldapcontrol**, ldapcontrol**, unsigned, extern "C" 
> int(*)(ldap*,unsigned,void*,void*), void*) is being passed 
> int(*)(ldap*,unsigned,void*,void*).
> 
> Sounds like the same thing.

And could you fix it with the same approach Matej suggested?

Ciao, Michael.

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev


Re: SunStudio compile

2008-08-22 Thread Anil
Thanks, that worked! I am able to compile it now, but if I enable sasl, 
it also fails:

"Modules/LDAPObject.c", line 568: Warning: String literal converted to 
char* in formal argument format in call to 
_PyObject_CallMethod_SizeT(_object*, char*, char*, ...).
"Modules/LDAPObject.c", line 614: Error: Cannot use void* to initialize 
sasl_interact*.
"Modules/LDAPObject.c", line 615: Error: Cannot use void* to initialize 
_object*.
"Modules/LDAPObject.c", line 689: Warning (Anachronism): Formal argument 
proc of type extern "C" int(*)(ldap*,unsigned,void*,void*) in call to 
ldap_sasl_interactive_bind_s(ldap*, const char*, const char*, 
ldapcontrol**, ldapcontrol**, unsigned, extern "C" 
int(*)(ldap*,unsigned,void*,void*), void*) is being passed 
int(*)(ldap*,unsigned,void*,void*).


Sounds like the same thing.


Matej Vela wrote:
> Anil <[EMAIL PROTECTED]> writes:
>
>   
>> I am trying to compile python ldap with SunStudio, I get this error. Any 
>> idea?
>> 
> [...]
>   
>> "Modules/options.c", line 108: Error: Formal argument 1 of type 
>> ldapcontrol** in call to LDAPControl_List_DEL(ldapcontrol**) is being 
>> passed void*.
>> 
>
> The type checking seems to be a bit overzealous.  Try changing line 108
> of Modules/options.c from
>
> LDAPControl_List_DEL(ptr);
>
> to
>
> LDAPControl_List_DEL((LDAPControl**) ptr);
>
> Cheers,
>
> Matej
>
> -
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ___
> Python-LDAP-dev mailing list
> Python-LDAP-dev@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/python-ldap-dev
>   


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev


Re: SunStudio compile

2008-08-22 Thread Michael Ströder
Matej Vela wrote:
> Anil <[EMAIL PROTECTED]> writes:
> 
>> I am trying to compile python ldap with SunStudio, I get this error. Any 
>> idea?
> [...]
>> "Modules/options.c", line 108: Error: Formal argument 1 of type 
>> ldapcontrol** in call to LDAPControl_List_DEL(ldapcontrol**) is being 
>> passed void*.
> 
> The type checking seems to be a bit overzealous.  Try changing line 108
> of Modules/options.c from
> 
> LDAPControl_List_DEL(ptr);
> 
> to
> 
> LDAPControl_List_DEL((LDAPControl**) ptr);

Matej, do you think we should change this in general?

Ciao, Michael.

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev


Re: SunStudio compile

2008-08-22 Thread Matej Vela
Anil <[EMAIL PROTECTED]> writes:

> I am trying to compile python ldap with SunStudio, I get this error. Any 
> idea?
[...]
> "Modules/options.c", line 108: Error: Formal argument 1 of type 
> ldapcontrol** in call to LDAPControl_List_DEL(ldapcontrol**) is being 
> passed void*.

The type checking seems to be a bit overzealous.  Try changing line 108
of Modules/options.c from

LDAPControl_List_DEL(ptr);

to

LDAPControl_List_DEL((LDAPControl**) ptr);

Cheers,

Matej

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev


SunStudio compile

2008-08-22 Thread Anil
I am trying to compile python ldap with SunStudio, I get this error. Any 
idea?

...
/opt/SUNWspro/bin/CC -I/opt/coolstack/include -DNDEBUG -fast -xipo 
-xtarget=generic -xcode=pic32 -DHAVE_LIBLDAP_R -DHAVE_TLS 
-DLDAPMODULE_VERSION=2.3.5 -IModules -I/opt/coolstack/include 
-I/opt/coolstack/include/sasl -I/opt/coolstack/include/python2.5 -c 
Modules/message.c -o build/temp.solaris-2.10-sun4u-2.5/Modules/message.o
"Modules/message.c", line 39: Warning: String literal converted to char* 
in formal argument msg in call to LDAPerror(ldap*, char*).
"Modules/message.c", line 134: Warning: String literal converted to 
char* in formal argument msg in call to LDAPerror(ldap*, char*).
2 Warning(s) detected.
/opt/SUNWspro/bin/CC -I/opt/coolstack/include -DNDEBUG -fast -xipo 
-xtarget=generic -xcode=pic32 -DHAVE_LIBLDAP_R -DHAVE_TLS 
-DLDAPMODULE_VERSION=2.3.5 -IModules -I/opt/coolstack/include 
-I/opt/coolstack/include/sasl -I/opt/coolstack/include/python2.5 -c 
Modules/version.c -o build/temp.solaris-2.10-sun4u-2.5/Modules/version.o
/opt/SUNWspro/bin/CC -I/opt/coolstack/include -DNDEBUG -fast -xipo 
-xtarget=generic -xcode=pic32 -DHAVE_LIBLDAP_R -DHAVE_TLS 
-DLDAPMODULE_VERSION=2.3.5 -IModules -I/opt/coolstack/include 
-I/opt/coolstack/include/sasl -I/opt/coolstack/include/python2.5 -c 
Modules/options.c -o build/temp.solaris-2.10-sun4u-2.5/Modules/options.o
"Modules/options.c", line 108: Error: Formal argument 1 of type 
ldapcontrol** in call to LDAPControl_List_DEL(ldapcontrol**) is being 
passed void*.
1 Error(s) detected.
error: command '/opt/SUNWspro/bin/CC' failed with exit status 1


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev