You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-commits@quetz.apache.org by nl...@apache.org on 2005/01/25 23:53:06 UTC

svn commit: r126440 - /httpd/mod_python/trunk/dist/setup.py.in /httpd/mod_python/trunk/src/include/psp_flex.h /httpd/mod_python/trunk/src/psp_parser.c

Author: nlehuen
Date: Tue Jan 25 14:53:06 2005
New Revision: 126440

URL: http://svn.apache.org/viewcvs?view=rev&rev=126440
Log:
Define and use the WIN32 macro when building _psp.pyd, so that mod_python can be built on Win32 platform without removing the reference to unistd.h in psp_flex.h and psp_parser.c.
Modified:
   httpd/mod_python/trunk/dist/setup.py.in
   httpd/mod_python/trunk/src/include/psp_flex.h
   httpd/mod_python/trunk/src/psp_parser.c

Modified: httpd/mod_python/trunk/dist/setup.py.in
Url: http://svn.apache.org/viewcvs/httpd/mod_python/trunk/dist/setup.py.in?view=diff&rev=126440&p1=httpd/mod_python/trunk/dist/setup.py.in&r1=126439&p2=httpd/mod_python/trunk/dist/setup.py.in&r2=126440
==============================================================================
--- httpd/mod_python/trunk/dist/setup.py.in	(original)
+++ httpd/mod_python/trunk/dist/setup.py.in	Tue Jan 25 14:53:06 2005
@@ -100,7 +100,8 @@
         Extension.__init__(self, "mod_python._psp",
                                [os.path.join(source_dir, source_file) for source_file in
                                     ("psp_string.c", "psp_parser.c", "_pspmodule.c")],
-                                include_dirs=include_dirs
+                                include_dirs=include_dirs,
+                                define_macros=[('WIN32',None)]
                            )
 
 PSPModule = PSPExtension(getmp_srcdir(), [getmp_includedir()])

Modified: httpd/mod_python/trunk/src/include/psp_flex.h
Url: http://svn.apache.org/viewcvs/httpd/mod_python/trunk/src/include/psp_flex.h?view=diff&rev=126440&p1=httpd/mod_python/trunk/src/include/psp_flex.h&r1=126439&p2=httpd/mod_python/trunk/src/include/psp_flex.h&r2=126440
==============================================================================
--- httpd/mod_python/trunk/src/include/psp_flex.h	(original)
+++ httpd/mod_python/trunk/src/include/psp_flex.h	Tue Jan 25 14:53:06 2005
@@ -225,7 +225,9 @@
  * down here because we want the user's section 1 to have been scanned first.
  * The user has a chance to override it with an option.
  */
+#ifndef WIN32
 #include <unistd.h>
+#endif
 
 #ifndef YY_EXTRA_TYPE
 #define YY_EXTRA_TYPE void *

Modified: httpd/mod_python/trunk/src/psp_parser.c
Url: http://svn.apache.org/viewcvs/httpd/mod_python/trunk/src/psp_parser.c?view=diff&rev=126440&p1=httpd/mod_python/trunk/src/psp_parser.c&r1=126439&p2=httpd/mod_python/trunk/src/psp_parser.c&r2=126440
==============================================================================
--- httpd/mod_python/trunk/src/psp_parser.c	(original)
+++ httpd/mod_python/trunk/src/psp_parser.c	Tue Jan 25 14:53:06 2005
@@ -521,7 +521,9 @@
  * down here because we want the user's section 1 to have been scanned first.
  * The user has a chance to override it with an option.
  */
+#ifndef WIN32
 #include <unistd.h>
+#endif
 
 #ifndef YY_EXTRA_TYPE
 #define YY_EXTRA_TYPE void *