kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #36742
[PATCH 4/5] Revert "Made libcontext compile on FreeBSD. Code formatting too."
This reverts commit 679074fdb28c88977cf69847bd9dff38ba636b8e.
---
include/system/libcontext.h | 107 ++++++++++++++++++++++----------------------
1 file changed, 53 insertions(+), 54 deletions(-)
diff --git a/include/system/libcontext.h b/include/system/libcontext.h
index a69fd9ef2..b45540fe2 100644
--- a/include/system/libcontext.h
+++ b/include/system/libcontext.h
@@ -1,18 +1,18 @@
/*
- *
- * libcontext - a slightly more portable version of boost::context
- *
- * Copyright Martin Husemann 2013.
- * Copyright Oliver Kowalke 2009.
- * Copyright Sergue E. Leontiev 2013.
- * Copyright Thomas Sailer 2013.
- * Minor modifications by Tomasz Wlostowski 2016.
- *
- * Distributed under the Boost Software License, Version 1.0.
- * (See accompanying file LICENSE_1_0.txt or copy at
- * http://www.boost.org/LICENSE_1_0.txt)
- *
- */
+
+ libcontext - a slightly more portable version of boost::context
+
+ Copyright Martin Husemann 2013.
+ Copyright Oliver Kowalke 2009.
+ Copyright Sergue E. Leontiev 2013.
+ Copyright Thomas Sailer 2013.
+ Minor modifications by Tomasz Wlostowski 2016.
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+
+*/
#ifndef __LIBCONTEXT_H
#define __LIBCONTEXT_H
@@ -27,41 +27,41 @@
#define LIBCONTEXT_COMPILER_gcc
#if defined(__linux__)
- #ifdef __x86_64__
- #define LIBCONTEXT_PLATFORM_linux_x86_64
- #define LIBCONTEXT_CALL_CONVENTION
-
- #elif __i386__
- #define LIBCONTEXT_PLATFORM_linux_i386
- #define LIBCONTEXT_CALL_CONVENTION
- #elif __arm__
- #define LIBCONTEXT_PLATFORM_linux_arm32
- #define LIBCONTEXT_CALL_CONVENTION
- #elif __aarch64__
- #define LIBCONTEXT_PLATFORM_linux_arm64
- #define LIBCONTEXT_CALL_CONVENTION
- #endif
-
- #elif defined(__MINGW32__) || defined(__MINGW64__)
- #if defined(__x86_64__)
- #define LIBCONTEXT_COMPILER_gcc
- #define LIBCONTEXT_PLATFORM_windows_x86_64
- #define LIBCONTEXT_CALL_CONVENTION
- #endif
-
- #if defined(__i386__)
- #define LIBCONTEXT_COMPILER_gcc
- #define LIBCONTEXT_PLATFORM_windows_i386
- #define LIBCONTEXT_CALL_CONVENTION __cdecl
- #endif
+ #ifdef __x86_64__
+ #define LIBCONTEXT_PLATFORM_linux_x86_64
+ #define LIBCONTEXT_CALL_CONVENTION
+
+ #elif __i386__
+ #define LIBCONTEXT_PLATFORM_linux_i386
+ #define LIBCONTEXT_CALL_CONVENTION
+ #elif __arm__
+ #define LIBCONTEXT_PLATFORM_linux_arm32
+ #define LIBCONTEXT_CALL_CONVENTION
+ #elif __aarch64__
+ #define LIBCONTEXT_PLATFORM_linux_arm64
+ #define LIBCONTEXT_CALL_CONVENTION
+ #endif
+
+ #elif defined(__MINGW32__) || defined (__MINGW64__)
+ #if defined(__x86_64__)
+ #define LIBCONTEXT_COMPILER_gcc
+ #define LIBCONTEXT_PLATFORM_windows_x86_64
+ #define LIBCONTEXT_CALL_CONVENTION
+ #endif
+
+ #if defined(__i386__)
+ #define LIBCONTEXT_COMPILER_gcc
+ #define LIBCONTEXT_PLATFORM_windows_i386
+ #define LIBCONTEXT_CALL_CONVENTION __cdecl
+ #endif
#elif defined(__APPLE__) && defined(__MACH__)
- #if defined(__i386__)
- #define LIBCONTEXT_PLATFORM_apple_i386
- #define LIBCONTEXT_CALL_CONVENTION
- #elif defined(__x86_64__)
- #define LIBCONTEXT_PLATFORM_apple_x86_64
- #define LIBCONTEXT_CALL_CONVENTION
- #endif
+ #if defined (__i386__)
+ #define LIBCONTEXT_PLATFORM_apple_i386
+ #define LIBCONTEXT_CALL_CONVENTION
+ #elif defined (__x86_64__)
+ #define LIBCONTEXT_PLATFORM_apple_x86_64
+ #define LIBCONTEXT_CALL_CONVENTION
+ #endif
#endif
#endif
@@ -73,17 +73,16 @@ namespace libcontext {
typedef int intptr_t;
#endif
-typedef void* fcontext_t;
+typedef void* fcontext_t;
#ifdef __cplusplus
-extern "C" {
+extern "C"{
#endif
-intptr_t LIBCONTEXT_CALL_CONVENTION jump_fcontext( fcontext_t* ofc, fcontext_t nfc,
- intptr_t vp, bool preserve_fpu = false );
-fcontext_t LIBCONTEXT_CALL_CONVENTION make_fcontext( void* sp, size_t size,
- void (* fn)( intptr_t ) );
+intptr_t LIBCONTEXT_CALL_CONVENTION jump_fcontext( fcontext_t * ofc, fcontext_t nfc,
+ intptr_t vp, bool preserve_fpu = false);
+fcontext_t LIBCONTEXT_CALL_CONVENTION make_fcontext( void * sp, size_t size, void (* fn)( intptr_t) );
#ifdef __cplusplus
} // namespace
References