Re: [patch] additional functionality for Python backend

Kalle Olavi Niemitalo <[email protected]>
Newsgroups gmane.comp.web.links
Message-ID <[email protected]>
"M. Levinson" <[email protected]> writes:

> diff --git a/src/scripting/python/python.c b/src/scripting/python/python.c
> index cf9e0c0..13411c4 100644
> --- a/src/scripting/python/python.c
> +++ b/src/scripting/python/python.c
> @@ -4,11 +4,10 @@ #ifdef HAVE_CONFIG_H
>  #include "config.h"
>  #endif
>  
> -#include "scripting/python/core.h"
> -
>  #include "elinks.h"
>  
>  #include "main/module.h"
> +#include "scripting/python/core.h"
>  #include "scripting/python/hooks.h"
>  
>  

I get a preprocessor error and reverting the quoted patch fixes it.

make -C python all
make[3]: Siirrytään hakemistoon "/home/Kalle/build/i686-pc-linux-gnu/elinks/src/scripting/python"
gcc -DHAVE_CONFIG_H -I../../.. -I/home/Kalle/src/elinks/src -I/usr/include/python2.3 -I/usr/include/python2.3 -I/home/Kalle/prefix/include -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/perl/5.8/CORE -I/usr/include/python2.3 -I/usr/include/python2.3 -I/usr/include -I/usr/include/lua50 -I/usr/include -O0 -ggdb -Wall -Wall -Werror -fno-strict-aliasing -Wno-pointer-sign -o python.o -c /home/Kalle/src/elinks/src/scripting/python/python.c
In file included from /usr/include/python2.3/Python.h:8,
                 from /home/Kalle/src/elinks/src/scripting/python/core.h:5,
                 from /home/Kalle/src/elinks/src/scripting/python/python.c:10:
/usr/include/python2.3/pyconfig.h:853:1: error: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/sys/types.h:27,
                 from /home/Kalle/src/elinks/src/osdep/types.h:9,
                 from /home/Kalle/src/elinks/src/elinks.h:11,
                 from /home/Kalle/src/elinks/src/scripting/python/python.c:7:
/usr/include/features.h:150:1: error: this is the location of the previous definition
make[3]: *** [python.o] Virhe 1
make[3]: Poistutaan hakemistosta "/home/Kalle/build/i686-pc-linux-gnu/elinks/src/scripting/python"

/usr/include/features.h (from from Debian libc6-dev 2.3.6-7) does
this:

144	#ifdef _GNU_SOURCE
...
149	# undef  _POSIX_C_SOURCE
150	# define _POSIX_C_SOURCE	199506L
...
161	#endif

/usr/include/python2.3/pyconfig.h (from Debian python2.3-dev
2.3.5-15) does this:

852	/* Define to activate features from IEEE Stds 1003.1-2001 */
853	#define _POSIX_C_SOURCE 200112L

The -D_GNU_SOURCE option comes from `perl -MExtUtils::Embed -e ccopts`
of Debian perl 5.8.8-4.

_______________________________________________
elinks-dev mailing list
[email protected]
http://linuxfromscratch.org/mailman/listinfo/elinks-dev
signature.asc (application/pgp-signature, 188 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFFEbi6Hm9IGt60eMgRAkGVAJ9DH8uTSmxbwuSGrypjucYi7ws1AACg2Xiq
pKZTJ4iFo8fWIpRvo/D+BQo=
=5H46
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.