Author: rjung Date: Sat May 23 08:47:26 2015 New Revision: 1681292 URL: http://svn.apache.org/r1681292 Log: Sync trunk with 1.1 branch: Forward port
r1292841 | mturk | 2012-02-23 17:21:11 +0100 (Thu, 23 Feb 2012) | 1 line Axe so called public API which was never used. We are always loaded from JVM so no need for useless exports Modified: tomcat/native/trunk/native/include/tcn_api.h tomcat/native/trunk/native/src/jnilib.c Modified: tomcat/native/trunk/native/include/tcn_api.h URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/include/tcn_api.h?rev=1681292&r1=1681291&r2=1681292&view=diff ============================================================================== --- tomcat/native/trunk/native/include/tcn_api.h (original) +++ tomcat/native/trunk/native/include/tcn_api.h Sat May 23 08:47:26 2015 @@ -36,108 +36,6 @@ #include <jni.h> /** - * TCN_DECLARE_EXPORT is defined when building the TCN dynamic library, - * so that all public symbols are exported. - * - * TCN_DECLARE_STATIC is defined when including the TCN public headers, - * to provide static linkage when the dynamic library may be unavailable. - * - * TCN_DECLARE_STATIC and TCN_DECLARE_EXPORT are left undefined when - * including the TCN public headers, to import and link the symbols from - * the dynamic TCN library and assure appropriate indirection and calling - * conventions at compile time. - */ - -#if !defined(WIN32) -/** - * The public TCN functions are declared with TCN_DECLARE(), so they may - * use the most appropriate calling convention. Public APR functions with - * variable arguments must use TCN_DECLARE_NONSTD(). - * - * @deffunc TCN_DECLARE(rettype) apr_func(args); - */ -#define TCN_DECLARE(type) type -/** - * The public TCN functions using variable arguments are declared with - * TCN_DECLARE_NONSTD(), as they must use the C language calling convention. - * - * @deffunc TCN_DECLARE_NONSTD(rettype) apr_func(args, ...); - */ -#define TCN_DECLARE_NONSTD(type) type -/** - * The public TCN variables are declared with TCN_DECLARE_DATA. - * This assures the appropriate indirection is invoked at compile time. - * - * @deffunc TCN_DECLARE_DATA type apr_variable; - * @tip extern TCN_DECLARE_DATA type apr_variable; syntax is required for - * declarations within headers to properly import the variable. - */ -#define TCN_DECLARE_DATA -#elif defined(TCN_DECLARE_STATIC) -#define TCN_DECLARE(type) type __stdcall -#define TCN_DECLARE_NONSTD(type) type -#define TCN_DECLARE_DATA -#elif defined(TCN_DECLARE_EXPORT) -#define TCN_DECLARE(type) __declspec(dllexport) type __stdcall -#define TCN_DECLARE_NONSTD(type) __declspec(dllexport) type -#define TCN_DECLARE_DATA __declspec(dllexport) -#else -/** - * The public TCN functions are declared with TCN_DECLARE(), so they may - * use the most appropriate calling convention. Public APR functions with - * variable arguments must use TCN_DECLARE_NONSTD(). - * - */ -#define TCN_DECLARE(type) __declspec(dllimport) type __stdcall -/** - * The public TCN functions using variable arguments are declared with - * TCN_DECLARE_NONSTD(), as they must use the C language calling convention. - * - */ -#define TCN_DECLARE_NONSTD(type) __declspec(dllimport) type -/** - * The public TCN variables are declared with TCN_DECLARE_DATA. - * This assures the appropriate indirection is invoked at compile time. - * - * @remark extern TCN_DECLARE_DATA type apr_variable; syntax is required for - * declarations within headers to properly import the variable. - */ -#define TCN_DECLARE_DATA __declspec(dllimport) -#endif - -#if !defined(WIN32) || defined(TCN_MODULE_DECLARE_STATIC) -/** - * Declare a dso module's exported module structure as TCN_MODULE_DECLARE_DATA. - * - * Unless TCN_MODULE_DECLARE_STATIC is defined at compile time, symbols - * declared with TCN_MODULE_DECLARE_DATA are always exported. - * @code - * module TCN_MODULE_DECLARE_DATA mod_tag - * @endcode - */ -#if defined(WIN32) -#define TCN_MODULE_DECLARE(type) type __stdcall -#else -#define TCN_MODULE_DECLARE(type) type -#endif -#define TCN_MODULE_DECLARE_NONSTD(type) type -#define TCN_MODULE_DECLARE_DATA -#else -/** - * TCN_MODULE_DECLARE_EXPORT is a no-op. Unless contradicted by the - * TCN_MODULE_DECLARE_STATIC compile-time symbol, it is assumed and defined. - */ -#define TCN_MODULE_DECLARE_EXPORT -#define TCN_MODULE_DECLARE(type) __declspec(dllexport) type __stdcall -#define TCN_MODULE_DECLARE_NONSTD(type) __declspec(dllexport) type -#define TCN_MODULE_DECLARE_DATA __declspec(dllexport) -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/** * @file tcn_api.h * @brief * @@ -146,19 +44,19 @@ extern "C" { /* Return global apr pool */ -TCN_DECLARE(apr_pool_t *) tcn_get_global_pool(void); +apr_pool_t *tcn_get_global_pool(void); /* Return global String class */ -TCN_DECLARE(jclass) tcn_get_string_class(void); +jclass tcn_get_string_class(void); /* Return global JVM initalized on JNI_OnLoad */ -TCN_DECLARE(JavaVM *) tcn_get_java_vm(void); +JavaVM *tcn_get_java_vm(void); /* Get current thread JNIEnv */ -TCN_DECLARE(jint) tcn_get_java_env(JNIEnv **); +jint tcn_get_java_env(JNIEnv **); #ifdef __cplusplus } Modified: tomcat/native/trunk/native/src/jnilib.c URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/jnilib.c?rev=1681292&r1=1681291&r2=1681292&view=diff ============================================================================== --- tomcat/native/trunk/native/src/jnilib.c (original) +++ tomcat/native/trunk/native/src/jnilib.c Sat May 23 08:47:26 2015 @@ -474,7 +474,7 @@ TCN_IMPLEMENT_CALL(jint, Library, size)( return 0; } -TCN_DECLARE(apr_pool_t *) tcn_get_global_pool() +apr_pool_t *tcn_get_global_pool() { if (!tcn_global_pool) { if (apr_pool_create(&tcn_global_pool, NULL) != APR_SUCCESS) { @@ -485,17 +485,17 @@ TCN_DECLARE(apr_pool_t *) tcn_get_global return tcn_global_pool; } -TCN_DECLARE(jclass) tcn_get_string_class() +jclass tcn_get_string_class() { return jString_class; } -TCN_DECLARE(JavaVM *) tcn_get_java_vm() +JavaVM * tcn_get_java_vm() { return tcn_global_vm; } -TCN_DECLARE(jint) tcn_get_java_env(JNIEnv **env) +jint tcn_get_java_env(JNIEnv **env) { if ((*tcn_global_vm)->GetEnv(tcn_global_vm, (void **)env, JNI_VERSION_1_4)) { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org