[Python-checkins] r79595 - in python/branches/py3k-cdecimal/Modules/cdecimal: basearith.c basearith.h bench.c bits.h cdecimal.c constants.c context.c convolute.c convolute.h crt.c crt.h difradix2.c difradix2.h error.c fnt.c fnt.h fourstep.c fourstep.h io.c memory.c mpdecimal.c mpdecimal.h numbertheory.c sixstep.c sixstep.h transpose.c transpose.h transpose3.c
stefan.krah
python-checkins at python.org
Fri Apr 2 14:19:34 CEST 2010
Author: stefan.krah
Date: Fri Apr 2 14:19:34 2010
New Revision: 79595
Log:
Since it includes pyconfig.h, mpdecimal.h must go before system headers.
Modified:
python/branches/py3k-cdecimal/Modules/cdecimal/basearith.c
python/branches/py3k-cdecimal/Modules/cdecimal/basearith.h
python/branches/py3k-cdecimal/Modules/cdecimal/bench.c
python/branches/py3k-cdecimal/Modules/cdecimal/bits.h
python/branches/py3k-cdecimal/Modules/cdecimal/cdecimal.c
python/branches/py3k-cdecimal/Modules/cdecimal/constants.c
python/branches/py3k-cdecimal/Modules/cdecimal/context.c
python/branches/py3k-cdecimal/Modules/cdecimal/convolute.c
python/branches/py3k-cdecimal/Modules/cdecimal/convolute.h
python/branches/py3k-cdecimal/Modules/cdecimal/crt.c
python/branches/py3k-cdecimal/Modules/cdecimal/crt.h
python/branches/py3k-cdecimal/Modules/cdecimal/difradix2.c
python/branches/py3k-cdecimal/Modules/cdecimal/difradix2.h
python/branches/py3k-cdecimal/Modules/cdecimal/error.c
python/branches/py3k-cdecimal/Modules/cdecimal/fnt.c
python/branches/py3k-cdecimal/Modules/cdecimal/fnt.h
python/branches/py3k-cdecimal/Modules/cdecimal/fourstep.c
python/branches/py3k-cdecimal/Modules/cdecimal/fourstep.h
python/branches/py3k-cdecimal/Modules/cdecimal/io.c
python/branches/py3k-cdecimal/Modules/cdecimal/memory.c
python/branches/py3k-cdecimal/Modules/cdecimal/mpdecimal.c
python/branches/py3k-cdecimal/Modules/cdecimal/mpdecimal.h
python/branches/py3k-cdecimal/Modules/cdecimal/numbertheory.c
python/branches/py3k-cdecimal/Modules/cdecimal/sixstep.c
python/branches/py3k-cdecimal/Modules/cdecimal/sixstep.h
python/branches/py3k-cdecimal/Modules/cdecimal/transpose.c
python/branches/py3k-cdecimal/Modules/cdecimal/transpose.h
python/branches/py3k-cdecimal/Modules/cdecimal/transpose3.c
Modified: python/branches/py3k-cdecimal/Modules/cdecimal/basearith.c
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/basearith.c (original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/basearith.c Fri Apr 2 14:19:34 2010
@@ -4,13 +4,13 @@
*/
+#include "mpdecimal.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "constants.h"
#include "memory.h"
-#include "mpdecimal.h"
#include "typearith.h"
#include "basearith.h"
Modified: python/branches/py3k-cdecimal/Modules/cdecimal/basearith.h
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/basearith.h (original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/basearith.h Fri Apr 2 14:19:34 2010
@@ -8,8 +8,8 @@
#define BASEARITH_H
-#include <stdio.h>
#include "mpdecimal.h"
+#include <stdio.h>
#include "typearith.h"
Modified: python/branches/py3k-cdecimal/Modules/cdecimal/bench.c
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/bench.c (original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/bench.c Fri Apr 2 14:19:34 2010
@@ -4,9 +4,9 @@
*/
+#include "mpdecimal.h"
#include <stdio.h>
#include <time.h>
-#include "mpdecimal.h"
/*
Modified: python/branches/py3k-cdecimal/Modules/cdecimal/bits.h
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/bits.h (original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/bits.h Fri Apr 2 14:19:34 2010
@@ -8,8 +8,8 @@
#define BITS_H
-#include <stdio.h>
#include "mpdecimal.h"
+#include <stdio.h>
/* Check if n is a power of 2 */
Modified: python/branches/py3k-cdecimal/Modules/cdecimal/cdecimal.c
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/cdecimal.c (original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/cdecimal.c Fri Apr 2 14:19:34 2010
@@ -5,14 +5,15 @@
#include <Python.h>
-#include <stdlib.h>
#include "longintrepr.h"
#include "pythread.h"
#include "structmember.h"
+#include "mpdecimal.h"
+
+#include <stdlib.h>
#include "docstrings.h"
#include "memory.h"
-#include "mpdecimal.h"
#include "mptypes.h"
Modified: python/branches/py3k-cdecimal/Modules/cdecimal/constants.c
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/constants.c (original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/constants.c Fri Apr 2 14:19:34 2010
@@ -4,8 +4,8 @@
*/
-#include <stdio.h>
#include "mpdecimal.h"
+#include <stdio.h>
#include "constants.h"
Modified: python/branches/py3k-cdecimal/Modules/cdecimal/context.c
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/context.c (original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/context.c Fri Apr 2 14:19:34 2010
@@ -4,11 +4,10 @@
*/
+#include "mpdecimal.h"
#include <stdio.h>
#include <string.h>
#include <signal.h>
-#include "mpdecimal.h"
-
static void
Modified: python/branches/py3k-cdecimal/Modules/cdecimal/convolute.c
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/convolute.c (original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/convolute.c Fri Apr 2 14:19:34 2010
@@ -4,12 +4,12 @@
*/
+#include "mpdecimal.h"
#include <stdio.h>
#include "bits.h"
#include "constants.h"
#include "fnt.h"
#include "fourstep.h"
-#include "mpdecimal.h"
#include "numbertheory.h"
#include "sixstep.h"
#include "umodarith.h"
Modified: python/branches/py3k-cdecimal/Modules/cdecimal/convolute.h
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/convolute.h (original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/convolute.h Fri Apr 2 14:19:34 2010
@@ -8,11 +8,12 @@
#define CONVOLUTE_H
-#include <stdio.h>
#include "mpdecimal.h"
+#include <stdio.h>
#define SIX_STEP_THRESHOLD 4096
+
int fnt_convolute(mpd_uint_t *c1, mpd_uint_t *c2, mpd_size_t n, int modnum);
int fnt_autoconvolute(mpd_uint_t *c1, mpd_size_t n, int modnum);
Modified: python/branches/py3k-cdecimal/Modules/cdecimal/crt.c
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/crt.c (original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/crt.c Fri Apr 2 14:19:34 2010
@@ -4,9 +4,9 @@
*/
+#include "mpdecimal.h"
#include <stdio.h>
#include <assert.h>
-#include "mpdecimal.h"
#include "numbertheory.h"
#include "umodarith.h"
#include "crt.h"
Modified: python/branches/py3k-cdecimal/Modules/cdecimal/crt.h
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/crt.h (original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/crt.h Fri Apr 2 14:19:34 2010
@@ -8,8 +8,9 @@
#define CRT_H
-#include <stdio.h>
#include "mpdecimal.h"
+#include <stdio.h>
+
void crt3(mpd_uint_t *x1, mpd_uint_t *x2, mpd_uint_t *x3, mpd_size_t nmemb);
Modified: python/branches/py3k-cdecimal/Modules/cdecimal/difradix2.c
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/difradix2.c (original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/difradix2.c Fri Apr 2 14:19:34 2010
@@ -4,10 +4,10 @@
*/
+#include "mpdecimal.h"
#include <stdio.h>
#include <assert.h>
#include "bits.h"
-#include "mpdecimal.h"
#include "numbertheory.h"
#include "umodarith.h"
#include "difradix2.h"
Modified: python/branches/py3k-cdecimal/Modules/cdecimal/difradix2.h
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/difradix2.h (original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/difradix2.h Fri Apr 2 14:19:34 2010
@@ -8,8 +8,8 @@
#define DIF_RADIX2_H
-#include "stdio.h"
#include "mpdecimal.h"
+#include <stdio.h>
#include "numbertheory.h"
Modified: python/branches/py3k-cdecimal/Modules/cdecimal/error.c
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/error.c (original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/error.c Fri Apr 2 14:19:34 2010
@@ -4,13 +4,11 @@
*/
+#include "mpdecimal.h"
#include <stdio.h>
#include <stdarg.h>
-#include "mpdecimal.h"
-
-
void mpd_err_doit(int action, const char *fmt, ...)
{
va_list ap;
Modified: python/branches/py3k-cdecimal/Modules/cdecimal/fnt.c
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/fnt.c (original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/fnt.c Fri Apr 2 14:19:34 2010
@@ -4,12 +4,12 @@
*/
+#include "mpdecimal.h"
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "bits.h"
#include "difradix2.h"
-#include "mpdecimal.h"
#include "numbertheory.h"
#include "fnt.h"
Modified: python/branches/py3k-cdecimal/Modules/cdecimal/fnt.h
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/fnt.h (original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/fnt.h Fri Apr 2 14:19:34 2010
@@ -8,8 +8,9 @@
#define FNT_H
-#include <stdio.h>
#include "mpdecimal.h"
+#include <stdio.h>
+
int std_fnt(mpd_uint_t a[], mpd_size_t n, int modnum, int ordered UNUSED);
int std_inv_fnt(mpd_uint_t a[], mpd_size_t n, int modnum, int ordered UNUSED);
Modified: python/branches/py3k-cdecimal/Modules/cdecimal/fourstep.c
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/fourstep.c (original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/fourstep.c Fri Apr 2 14:19:34 2010
@@ -4,8 +4,8 @@
*/
-#include <assert.h>
#include "mpdecimal.h"
+#include <assert.h>
#include "numbertheory.h"
#include "sixstep.h"
#include "transpose.h"
Modified: python/branches/py3k-cdecimal/Modules/cdecimal/fourstep.h
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/fourstep.h (original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/fourstep.h Fri Apr 2 14:19:34 2010
@@ -8,8 +8,9 @@
#define FOUR_STEP_H
-#include <stdio.h>
#include "mpdecimal.h"
+#include <stdio.h>
+
int four_step_fnt(mpd_uint_t *a, mpd_size_t n, int modnum, int ordered);
int inv_four_step_fnt(mpd_uint_t *a, mpd_size_t n, int modnum, int ordered);
Modified: python/branches/py3k-cdecimal/Modules/cdecimal/io.c
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/io.c (original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/io.c Fri Apr 2 14:19:34 2010
@@ -4,6 +4,7 @@
*/
+#include "mpdecimal.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -15,7 +16,6 @@
#include "bits.h"
#include "constants.h"
#include "memory.h"
-#include "mpdecimal.h"
#include "typearith.h"
#include "io.h"
Modified: python/branches/py3k-cdecimal/Modules/cdecimal/memory.c
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/memory.c (original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/memory.c Fri Apr 2 14:19:34 2010
@@ -4,9 +4,9 @@
*/
+#include "mpdecimal.h"
#include <stdio.h>
#include <stdlib.h>
-#include "mpdecimal.h"
#include "typearith.h"
#include "memory.h"
Modified: python/branches/py3k-cdecimal/Modules/cdecimal/mpdecimal.c
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/mpdecimal.c (original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/mpdecimal.c Fri Apr 2 14:19:34 2010
@@ -4,6 +4,7 @@
*/
+#include "mpdecimal.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -19,7 +20,6 @@
#include "umodarith.h"
#include "mptest.h"
#include "mptypes.h"
-#include "mpdecimal.h"
#ifdef PPRO
#if defined(_MSC_VER)
Modified: python/branches/py3k-cdecimal/Modules/cdecimal/mpdecimal.h
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/mpdecimal.h (original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/mpdecimal.h Fri Apr 2 14:19:34 2010
@@ -16,20 +16,27 @@
#define EXTINLINE extern inline
#else
#include "pyconfig.h"
- #if HAVE_STDINT_H
+ #ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
+ #ifdef HAVE_INTTYPES_H
+ #include <inttypes.h>
+ #endif
#define __GNUC_STDC_INLINE__
#define UNUSED __attribute__((unused))
#define EXTINLINE
#endif
+
#if !defined(LEGACY_COMPILER)
#if !defined(UINT64_MAX)
+ /* XXX: This warning is temporary and can be removed at some point. */
+ #error "Warning: Compiler without uint64_t. Comment out this line."
#define LEGACY_COMPILER
#endif
#endif
+
#if defined(CONFIG_64)
#include "mpdecimal64.h"
#elif defined(CONFIG_32)
Modified: python/branches/py3k-cdecimal/Modules/cdecimal/numbertheory.c
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/numbertheory.c (original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/numbertheory.c Fri Apr 2 14:19:34 2010
@@ -4,10 +4,10 @@
*/
+#include "mpdecimal.h"
#include <stdlib.h>
#include <assert.h>
#include "bits.h"
-#include "mpdecimal.h"
#include "umodarith.h"
#include "numbertheory.h"
Modified: python/branches/py3k-cdecimal/Modules/cdecimal/sixstep.c
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/sixstep.c (original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/sixstep.c Fri Apr 2 14:19:34 2010
@@ -4,12 +4,12 @@
*/
+#include "mpdecimal.h"
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "bits.h"
#include "difradix2.h"
-#include "mpdecimal.h"
#include "mptypes.h"
#include "numbertheory.h"
#include "transpose.h"
Modified: python/branches/py3k-cdecimal/Modules/cdecimal/sixstep.h
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/sixstep.h (original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/sixstep.h Fri Apr 2 14:19:34 2010
@@ -8,8 +8,8 @@
#define SIX_STEP_H
-#include <stdio.h>
#include "mpdecimal.h"
+#include <stdio.h>
int six_step_fnt(mpd_uint_t *a, mpd_size_t n, int modnum, int ordered);
Modified: python/branches/py3k-cdecimal/Modules/cdecimal/transpose.c
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/transpose.c (original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/transpose.c Fri Apr 2 14:19:34 2010
@@ -4,6 +4,7 @@
*/
+#include "mpdecimal.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -11,7 +12,6 @@
#include <assert.h>
#include "bits.h"
#include "constants.h"
-#include "mpdecimal.h"
#include "typearith.h"
#include "transpose.h"
Modified: python/branches/py3k-cdecimal/Modules/cdecimal/transpose.h
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/transpose.h (original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/transpose.h Fri Apr 2 14:19:34 2010
@@ -8,8 +8,8 @@
#define TRANSPOSE_H
-#include <stdio.h>
#include "mpdecimal.h"
+#include <stdio.h>
enum {FORWARD_CYCLE, BACKWARD_CYCLE};
Modified: python/branches/py3k-cdecimal/Modules/cdecimal/transpose3.c
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/transpose3.c (original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/transpose3.c Fri Apr 2 14:19:34 2010
@@ -4,13 +4,13 @@
*/
+#include "mpdecimal.h"
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <assert.h>
#include "bits.h"
#include "constants.h"
-#include "mpdecimal.h"
#include "typearith.h"
#include "transpose.h"
More information about the Python-checkins
mailing list