aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMouse <[email protected]>2015-08-14 16:26:10 -0400
committerMouse <[email protected]>2015-08-14 16:26:10 -0400
commit451e0be58e0611a56bfed2c2ac3315dfbc6f244c (patch)
tree26a3189b96c1b029b06ba1d0e6980072f61fe276 /src
parent273cd990a6f75ac44cce2ec58a59808cdbcc84c6 (diff)
parent929905ec8a598dccaac85097a6dc9a53a151e4f6 (diff)
Merge pull request #1 from randombit/master
Merging mainstream updates
Diffstat (limited to 'src')
-rw-r--r--src/build-data/cc/clang.txt8
-rw-r--r--src/lib/math/mp/mp_asm.cpp4
-rw-r--r--src/lib/math/mp/mp_comba.cpp4
-rw-r--r--src/lib/math/mp/mp_core.h4
-rw-r--r--src/lib/math/mp/mp_generic/mp_asmi.h4
-rw-r--r--src/lib/math/mp/mp_generic/mp_madd.h4
-rw-r--r--src/lib/math/mp/mp_karat.cpp4
-rw-r--r--src/lib/math/mp/mp_misc.cpp4
-rw-r--r--src/lib/math/mp/mp_monty.cpp4
-rw-r--r--src/lib/math/mp/mp_mulop.cpp4
-rw-r--r--src/lib/math/mp/mp_shift.cpp4
-rw-r--r--src/lib/math/mp/mp_x86_32/mp_asmi.h4
-rw-r--r--src/lib/math/mp/mp_x86_32/mp_madd.h4
-rw-r--r--src/lib/math/mp/mp_x86_32_msvc/mp_asmi.h4
-rw-r--r--src/lib/math/mp/mp_x86_64/mp_asmi.h4
-rw-r--r--src/lib/math/mp/mp_x86_64/mp_madd.h4
-rw-r--r--src/scripts/ci/appveyor.yml9
-rwxr-xr-xsrc/scripts/comba.py4
18 files changed, 15 insertions, 66 deletions
diff --git a/src/build-data/cc/clang.txt b/src/build-data/cc/clang.txt
index d2d2f9928..8b09831d6 100644
--- a/src/build-data/cc/clang.txt
+++ b/src/build-data/cc/clang.txt
@@ -26,10 +26,12 @@ visibility_attribute '__attribute__((visibility("default")))'
makefile_style gmake
<so_link_commands>
-# The default works for GNU ld and several other Unix linkers
-default -> "$(CXX) -shared -fPIC -Wl,-soname,$(SONAME)"
+darwin -> "$(CXX) -dynamiclib -fPIC -install_name $(LIBDIR)/$(SONAME)"
+darwin-debug -> "$(CXX) -dynamiclib -fPIC -install_name $(LIBDIR)/$(SONAME)"
-darwin -> "$(CXX) -dynamiclib -fPIC -install_name $(LIBDIR)/$(SONAME)"
+# The default works for GNU ld and several other Unix linkers
+default -> "$(CXX) -shared -fPIC -Wl,-soname,$(SONAME)"
+default-debug -> "$(CXX) -shared -fPIC -Wl,-soname,$(SONAME)"
</so_link_commands>
<binary_link_commands>
diff --git a/src/lib/math/mp/mp_asm.cpp b/src/lib/math/mp/mp_asm.cpp
index 6941a22e9..cc573a792 100644
--- a/src/lib/math/mp/mp_asm.cpp
+++ b/src/lib/math/mp/mp_asm.cpp
@@ -14,8 +14,6 @@
namespace Botan {
-extern "C" {
-
/*
* Two Operand Addition, No Carry
*/
@@ -185,5 +183,3 @@ void bigint_linmul3(word z[], const word x[], size_t x_size, word y)
}
}
-
-}
diff --git a/src/lib/math/mp/mp_comba.cpp b/src/lib/math/mp/mp_comba.cpp
index a21b25ed6..0170c9fcd 100644
--- a/src/lib/math/mp/mp_comba.cpp
+++ b/src/lib/math/mp/mp_comba.cpp
@@ -10,8 +10,6 @@
namespace Botan {
-extern "C" {
-
/*
* Comba 4x4 Squaring
*/
@@ -1128,5 +1126,3 @@ void bigint_comba_mul16(word z[32], const word x[16], const word y[16])
}
}
-
-}
diff --git a/src/lib/math/mp/mp_core.h b/src/lib/math/mp/mp_core.h
index 06f1d4a2d..b97384d18 100644
--- a/src/lib/math/mp/mp_core.h
+++ b/src/lib/math/mp/mp_core.h
@@ -18,8 +18,6 @@ namespace Botan {
*/
const size_t MP_WORD_BITS = BOTAN_MP_WORD_BITS;
-extern "C" {
-
/**
* Two operand addition
* @param x the first operand (and output)
@@ -160,8 +158,6 @@ void bigint_comba_sqr8(word out[16], const word in[8]);
void bigint_comba_sqr9(word out[18], const word in[9]);
void bigint_comba_sqr16(word out[32], const word in[16]);
-}
-
/*
* High Level Multiplication/Squaring Interfaces
*/
diff --git a/src/lib/math/mp/mp_generic/mp_asmi.h b/src/lib/math/mp/mp_generic/mp_asmi.h
index c094436f6..708afdfa0 100644
--- a/src/lib/math/mp/mp_generic/mp_asmi.h
+++ b/src/lib/math/mp/mp_generic/mp_asmi.h
@@ -13,8 +13,6 @@
namespace Botan {
-extern "C" {
-
/*
* Word Addition
*/
@@ -202,6 +200,4 @@ inline void word3_muladd_2(word* w2, word* w1, word* w0, word a, word b)
}
-}
-
#endif
diff --git a/src/lib/math/mp/mp_generic/mp_madd.h b/src/lib/math/mp/mp_generic/mp_madd.h
index d0d56c23f..292c23e97 100644
--- a/src/lib/math/mp/mp_generic/mp_madd.h
+++ b/src/lib/math/mp/mp_generic/mp_madd.h
@@ -13,8 +13,6 @@
namespace Botan {
-extern "C" {
-
/*
* Word Multiply/Add
*/
@@ -68,6 +66,4 @@ inline word word_madd3(word a, word b, word c, word* d)
}
-}
-
#endif
diff --git a/src/lib/math/mp/mp_karat.cpp b/src/lib/math/mp/mp_karat.cpp
index faa91040c..96d9adae2 100644
--- a/src/lib/math/mp/mp_karat.cpp
+++ b/src/lib/math/mp/mp_karat.cpp
@@ -13,8 +13,8 @@ namespace Botan {
namespace {
-static const size_t KARATSUBA_MULTIPLY_THRESHOLD = 32;
-static const size_t KARATSUBA_SQUARE_THRESHOLD = 32;
+const size_t KARATSUBA_MULTIPLY_THRESHOLD = 32;
+const size_t KARATSUBA_SQUARE_THRESHOLD = 32;
/*
* Karatsuba Multiplication Operation
diff --git a/src/lib/math/mp/mp_misc.cpp b/src/lib/math/mp/mp_misc.cpp
index bd04818e5..542b0509e 100644
--- a/src/lib/math/mp/mp_misc.cpp
+++ b/src/lib/math/mp/mp_misc.cpp
@@ -11,8 +11,6 @@
namespace Botan {
-extern "C" {
-
/*
* Compare two MP integers
*/
@@ -79,5 +77,3 @@ word bigint_modop(word n1, word n0, word d)
}
}
-
-}
diff --git a/src/lib/math/mp/mp_monty.cpp b/src/lib/math/mp/mp_monty.cpp
index ffceaab9b..820f41e6c 100644
--- a/src/lib/math/mp/mp_monty.cpp
+++ b/src/lib/math/mp/mp_monty.cpp
@@ -13,8 +13,6 @@
namespace Botan {
-extern "C" {
-
/*
* Montgomery Reduction Algorithm
*/
@@ -112,5 +110,3 @@ void bigint_monty_sqr(word z[], size_t z_size,
}
}
-
-}
diff --git a/src/lib/math/mp/mp_mulop.cpp b/src/lib/math/mp/mp_mulop.cpp
index 95a0e015e..432c7ef53 100644
--- a/src/lib/math/mp/mp_mulop.cpp
+++ b/src/lib/math/mp/mp_mulop.cpp
@@ -12,8 +12,6 @@
namespace Botan {
-extern "C" {
-
/*
* Simple O(N^2) Multiplication
*/
@@ -73,5 +71,3 @@ void bigint_simple_sqr(word z[], const word x[], size_t x_size)
}
}
-
-}
diff --git a/src/lib/math/mp/mp_shift.cpp b/src/lib/math/mp/mp_shift.cpp
index d58a0c809..1850888a0 100644
--- a/src/lib/math/mp/mp_shift.cpp
+++ b/src/lib/math/mp/mp_shift.cpp
@@ -10,8 +10,6 @@
namespace Botan {
-extern "C" {
-
/*
* Single Operand Left Shift
*/
@@ -133,5 +131,3 @@ void bigint_shr2(word y[], const word x[], size_t x_size,
}
}
-
-}
diff --git a/src/lib/math/mp/mp_x86_32/mp_asmi.h b/src/lib/math/mp/mp_x86_32/mp_asmi.h
index 49ca428d6..95af89fc0 100644
--- a/src/lib/math/mp/mp_x86_32/mp_asmi.h
+++ b/src/lib/math/mp/mp_x86_32/mp_asmi.h
@@ -13,8 +13,6 @@
namespace Botan {
-extern "C" {
-
/*
* Helper Macros for x86 Assembly
*/
@@ -235,6 +233,4 @@ inline void word3_muladd_2(word* w2, word* w1, word* w0, word x, word y)
}
-}
-
#endif
diff --git a/src/lib/math/mp/mp_x86_32/mp_madd.h b/src/lib/math/mp/mp_x86_32/mp_madd.h
index b6a60aecd..9c0990398 100644
--- a/src/lib/math/mp/mp_x86_32/mp_madd.h
+++ b/src/lib/math/mp/mp_x86_32/mp_madd.h
@@ -17,8 +17,6 @@
namespace Botan {
-extern "C" {
-
/*
* Helper Macros for x86 Assembly
*/
@@ -62,6 +60,4 @@ inline word word_madd3(word a, word b, word c, word* d)
}
-}
-
#endif
diff --git a/src/lib/math/mp/mp_x86_32_msvc/mp_asmi.h b/src/lib/math/mp/mp_x86_32_msvc/mp_asmi.h
index b4a9af1e3..1887e57ce 100644
--- a/src/lib/math/mp/mp_x86_32_msvc/mp_asmi.h
+++ b/src/lib/math/mp/mp_x86_32_msvc/mp_asmi.h
@@ -13,8 +13,6 @@
namespace Botan {
-extern "C" {
-
/*
* Word Addition
*/
@@ -537,6 +535,4 @@ inline void word3_muladd_2(word* w2, word* w1, word* w0, word a, word b)
}
-}
-
#endif
diff --git a/src/lib/math/mp/mp_x86_64/mp_asmi.h b/src/lib/math/mp/mp_x86_64/mp_asmi.h
index 2c7683650..cd5884867 100644
--- a/src/lib/math/mp/mp_x86_64/mp_asmi.h
+++ b/src/lib/math/mp/mp_x86_64/mp_asmi.h
@@ -13,8 +13,6 @@
namespace Botan {
-extern "C" {
-
/*
* Helper Macros for x86-64 Assembly
*/
@@ -233,7 +231,6 @@ inline void word3_muladd_2(word* w2, word* w1, word* w0, word x, word y)
: "cc");
}
-
#undef ASM
#undef DO_8_TIMES
#undef ADD_OR_SUBTRACT
@@ -244,5 +241,4 @@ inline void word3_muladd_2(word* w2, word* w1, word* w0, word x, word y)
}
-}
#endif
diff --git a/src/lib/math/mp/mp_x86_64/mp_madd.h b/src/lib/math/mp/mp_x86_64/mp_madd.h
index 25f791da4..6f9185dc0 100644
--- a/src/lib/math/mp/mp_x86_64/mp_madd.h
+++ b/src/lib/math/mp/mp_x86_64/mp_madd.h
@@ -17,8 +17,6 @@
namespace Botan {
-extern "C" {
-
/*
* Helper Macros for x86-64 Assembly
*/
@@ -64,6 +62,4 @@ inline word word_madd3(word a, word b, word c, word* d)
}
-}
-
#endif
diff --git a/src/scripts/ci/appveyor.yml b/src/scripts/ci/appveyor.yml
index a2fe822a8..aa0c3890c 100644
--- a/src/scripts/ci/appveyor.yml
+++ b/src/scripts/ci/appveyor.yml
@@ -1,10 +1,15 @@
os: Windows Server 2012 R2
+platform:
+ - x86
+ - x86_amd64
+
install:
- - call "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86
+ - call "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %PLATFORM%
+ - cl # check compiler version
build_script:
- - python configure.py --disable-shared --via-amalgamation --cpu=x86_32 --cc=msvc
+ - python configure.py --disable-shared --via-amalgamation --cpu=%PLATFORM% --cc=msvc
- nmake
- botan-test
- nmake install
diff --git a/src/scripts/comba.py b/src/scripts/comba.py
index fe588f7bc..dcac14657 100755
--- a/src/scripts/comba.py
+++ b/src/scripts/comba.py
@@ -87,8 +87,6 @@ def main(args = None):
#include <botan/internal/mp_asmi.h>
namespace Botan {
-
-extern "C" {
"""
for n in [4,6,8,9,16]:
@@ -110,7 +108,7 @@ extern "C" {
print " }\n"
- print "}\n\n}"
+ print "}"
if __name__ == '__main__':
sys.exit(main())