Skip to content

Instantly share code, notes, and snippets.

@vvavrychuk
vvavrychuk / libcxx-3.4.2-musl_compat.patch
Created July 5, 2014 10:54
libcxx-3.4.2-musl_compat.patch
diff --git a/include/__config b/include/__config
index aa8bc44..d04464e 100644
--- a/include/__config
+++ b/include/__config
@@ -314,14 +314,10 @@ typedef __char32_t char32_t;
#define _LIBCPP_HAS_C11_FEATURES
#elif defined(__linux__)
#include <features.h>
-#if __GLIBC_PREREQ(2, 15)
#define _LIBCPP_HAS_QUICK_EXIT
diff --git a/boost/smart_ptr/shared_ptr.hpp b/boost/smart_ptr/shared_ptr.hpp
index 9259ca0..c75d9f4 100644
--- a/boost/smart_ptr/shared_ptr.hpp
+++ b/boost/smart_ptr/shared_ptr.hpp
@@ -349,7 +349,7 @@ public:
#endif
template<class Y>
- explicit shared_ptr( Y * p ): px( p ), pn() // Y must be complete
+ shared_ptr( Y * p ): px( p ), pn() // Y must be complete
diff --git a/Foundation/include/Poco/Any.h b/Foundation/include/Poco/Any.h
index a86abba..749962f 100644
--- a/Foundation/include/Poco/Any.h
+++ b/Foundation/include/Poco/Any.h
@@ -463,6 +463,31 @@ private:
Holder & operator=(const Holder &);
};
+ template <size_t N>
+ class Holder<char[N]>: public ValueHolder
diff --git a/build/config/Linux b/build/config/Linux
index 4781a12..97c2a71 100644
--- a/build/config/Linux
+++ b/build/config/Linux
@@ -49,7 +49,7 @@ LINKFLAGS32 =
LINKFLAGS64 =
STATICOPT_CC =
STATICOPT_CXX =
-STATICOPT_LINK = -static
+STATICOPT_LINK =
diff --git a/src/cxa_guard.cpp b/src/cxa_guard.cpp
index b22fcbb..c6ac89f 100644
--- a/src/cxa_guard.cpp
+++ b/src/cxa_guard.cpp
@@ -187,6 +187,7 @@ void __cxa_guard_abort(guard_type* guard_object)
int __cxa_guard_acquire(guard_type* guard_object)
{
+ char* initialized = (char*)guard_object;
if (pthread_mutex_lock(&guard_mut))
diff --git a/lib/buildit b/lib/buildit
index f44d673..d43807d 100755
--- a/lib/buildit
+++ b/lib/buildit
@@ -91,7 +91,7 @@ case $TRIPLE in
done
;;
esac
-$CC *.o $RC_CFLAGS $LDSHARED_FLAGS $EXTRA_FLAGS
+ar cru libc++abi.a *.o
diff --git a/src/network/h_errno.c b/src/network/h_errno.c
index 4f700ce..ed4787f 100644
--- a/src/network/h_errno.c
+++ b/src/network/h_errno.c
@@ -1,7 +1,7 @@
#include <netdb.h>
#undef h_errno
-int h_errno;
+__thread int h_errno;
diff --git a/src/math/isinf.c b/src/math/isinf.c
new file mode 100644
index 0000000..638543c
--- /dev/null
+++ b/src/math/isinf.c
@@ -0,0 +1,9 @@
+#include <math.h>
+#include "libc.h"
+
+int __isinff(float arg)
#!/usr/bin/env python
"""Can check if one packed depends on another and can simplify packets
list by removing dependencies"""
import apt
import sys
cache = apt.Cache()
def all_or_dependencies(dependencies):
@vvavrychuk
vvavrychuk / Integrate.java
Last active January 28, 2016 13:11
maven-sub-projects/na-lib/src/main/java/Integrate.java
import java.util.function.Function;
public class Integrate {
private double a;
private double b;
private int n;
public Integrate(double a, double b, int n) {
this.a = a;
this.b = b;