diff --git a/content/media/omx/MediaOmxReader.h b/content/media/omx/MediaOmxReader.h index b52086e66c0..ca47b29bce1 100644 --- a/content/media/omx/MediaOmxReader.h +++ b/content/media/omx/MediaOmxReader.h @@ -15,7 +15,7 @@ namespace android { class OmxDecoder; -class MediaExtractor; +class MOZ_EXPORT MediaExtractor; } namespace mozilla { diff --git a/dom/camera/GonkRecorder.h b/dom/camera/GonkRecorder.h index d99cf8ccc71..2ddc9a0919f 100644 --- a/dom/camera/GonkRecorder.h +++ b/dom/camera/GonkRecorder.h @@ -31,11 +31,11 @@ namespace android { class GonkCameraSource; -struct MediaSource; -struct MediaWriter; -class MetaData; -struct AudioSource; -class MediaProfiles; +struct MOZ_EXPORT MediaSource; +struct MOZ_EXPORT MediaWriter; +class MOZ_EXPORT MetaData; +struct MOZ_EXPORT AudioSource; +class MOZ_EXPORT MediaProfiles; class GonkCameraHardware; struct GonkRecorder { diff --git a/js/src/jit/AsmJSModule.cpp b/js/src/jit/AsmJSModule.cpp index 312239089c5..52d24134c50 100644 --- a/js/src/jit/AsmJSModule.cpp +++ b/js/src/jit/AsmJSModule.cpp @@ -167,10 +167,10 @@ InvokeFromAsmJS_ToNumber(JSContext *cx, int32_t exitIndex, int32_t argc, Value * #if defined(JS_CODEGEN_ARM) extern "C" { -extern int64_t +extern MOZ_EXPORT int64_t __aeabi_idivmod(int, int); -extern int64_t +extern MOZ_EXPORT int64_t __aeabi_uidivmod(int, int); } diff --git a/js/src/jit/arm/BaselineIC-arm.cpp b/js/src/jit/arm/BaselineIC-arm.cpp index 1b2b9126edb..1f6ae53298f 100644 --- a/js/src/jit/arm/BaselineIC-arm.cpp +++ b/js/src/jit/arm/BaselineIC-arm.cpp @@ -71,7 +71,7 @@ ICCompare_Double::Compiler::generateStubCode(MacroAssembler &masm) // ICBinaryArith_Int32 extern "C" { - extern int64_t __aeabi_idivmod(int,int); + extern MOZ_EXPORT int64_t __aeabi_idivmod(int,int); } bool diff --git a/js/src/jit/arm/CodeGenerator-arm.cpp b/js/src/jit/arm/CodeGenerator-arm.cpp index ffe96c8e6ae..387f78de483 100644 --- a/js/src/jit/arm/CodeGenerator-arm.cpp +++ b/js/src/jit/arm/CodeGenerator-arm.cpp @@ -619,8 +619,8 @@ CodeGeneratorARM::visitDivI(LDivI *ins) } extern "C" { - extern int64_t __aeabi_idivmod(int,int); - extern int64_t __aeabi_uidivmod(int,int); + extern MOZ_EXPORT int64_t __aeabi_idivmod(int,int); + extern MOZ_EXPORT int64_t __aeabi_uidivmod(int,int); } bool diff --git a/mozglue/android/APKOpen.h b/mozglue/android/APKOpen.h index dcab69e9f6c..c078d721285 100644 --- a/mozglue/android/APKOpen.h +++ b/mozglue/android/APKOpen.h @@ -18,7 +18,7 @@ struct mapping_info { size_t offset; }; -const struct mapping_info * getLibraryMapping(); +NS_EXPORT const struct mapping_info * getLibraryMapping(); static const int SUCCESS = 0; static const int FAILURE = 1; diff --git a/mozglue/build/BionicGlue.cpp b/mozglue/build/BionicGlue.cpp index e9330903d5f..877b92179aa 100644 --- a/mozglue/build/BionicGlue.cpp +++ b/mozglue/build/BionicGlue.cpp @@ -97,6 +97,8 @@ WRAP(pthread_atfork)(void (*prepare)(void), void (*parent)(void), void (*child)( return 0; } +extern "C" NS_EXPORT pid_t __fork(void); + extern "C" NS_EXPORT pid_t WRAP(fork)(void) { diff --git a/mozglue/build/Nuwa.cpp b/mozglue/build/Nuwa.cpp index ea717240b69..2c605221497 100644 --- a/mozglue/build/Nuwa.cpp +++ b/mozglue/build/Nuwa.cpp @@ -41,6 +41,7 @@ extern "C" MFBT_API int tgkill(pid_t tgid, pid_t tid, int signalno) { * Real functions for the wrappers. */ extern "C" { +#pragma GCC visibility push(default) int __real_pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine) (void *), @@ -69,6 +70,7 @@ int __real_pipe2(int __pipedes[2], int flags); int __real_pipe(int __pipedes[2]); int __real_epoll_ctl(int aEpollFd, int aOp, int aFd, struct epoll_event *aEvent); int __real_close(int aFd); +#pragma GCC visibility pop } #define REAL(s) __real_##s diff --git a/mozglue/linker/ElfLoader.cpp b/mozglue/linker/ElfLoader.cpp index 52f62f65a8b..28b4eb9bf7c 100644 --- a/mozglue/linker/ElfLoader.cpp +++ b/mozglue/linker/ElfLoader.cpp @@ -34,7 +34,7 @@ inline int sigaltstack(const stack_t *ss, stack_t *oss) { #endif /* ANDROID */ #ifdef __ARM_EABI__ -extern "C" const void * +extern "C" MOZ_EXPORT const void * __gnu_Unwind_Find_exidx(void *pc, int *pcount) __attribute__((weak)); #endif diff --git a/netwerk/protocol/rtsp/rtsp/AAMRAssembler.h b/netwerk/protocol/rtsp/rtsp/AAMRAssembler.h index d55e10923b2..1a18ee54322 100644 --- a/netwerk/protocol/rtsp/rtsp/AAMRAssembler.h +++ b/netwerk/protocol/rtsp/rtsp/AAMRAssembler.h @@ -18,6 +18,7 @@ #define A_AMR_ASSEMBLER_H_ +#include "mozilla/Types.h" #include "ARTPAssembler.h" #include @@ -26,8 +27,8 @@ namespace android { -struct AMessage; -struct AString; +struct MOZ_EXPORT AMessage; +struct MOZ_EXPORT AString; struct AAMRAssembler : public ARTPAssembler { AAMRAssembler( diff --git a/netwerk/protocol/rtsp/rtsp/AAVCAssembler.h b/netwerk/protocol/rtsp/rtsp/AAVCAssembler.h index bf389ec329e..87b62384e39 100644 --- a/netwerk/protocol/rtsp/rtsp/AAVCAssembler.h +++ b/netwerk/protocol/rtsp/rtsp/AAVCAssembler.h @@ -18,6 +18,7 @@ #define A_AVC_ASSEMBLER_H_ +#include "mozilla/Types.h" #include "ARTPAssembler.h" #include @@ -25,8 +26,8 @@ namespace android { -struct ABuffer; -struct AMessage; +struct MOZ_EXPORT ABuffer; +struct MOZ_EXPORT AMessage; struct AAVCAssembler : public ARTPAssembler { AAVCAssembler(const sp ¬ify); diff --git a/netwerk/protocol/rtsp/rtsp/AH263Assembler.h b/netwerk/protocol/rtsp/rtsp/AH263Assembler.h index 2b6c6253005..0b2e4d36992 100644 --- a/netwerk/protocol/rtsp/rtsp/AH263Assembler.h +++ b/netwerk/protocol/rtsp/rtsp/AH263Assembler.h @@ -18,6 +18,7 @@ #define A_H263_ASSEMBLER_H_ +#include "mozilla/Types.h" #include "ARTPAssembler.h" #include @@ -26,7 +27,7 @@ namespace android { -struct AMessage; +struct MOZ_EXPORT AMessage; struct AH263Assembler : public ARTPAssembler { AH263Assembler(const sp ¬ify); diff --git a/netwerk/protocol/rtsp/rtsp/AMPEG4AudioAssembler.h b/netwerk/protocol/rtsp/rtsp/AMPEG4AudioAssembler.h index 1361cd2db70..1969c190f4e 100644 --- a/netwerk/protocol/rtsp/rtsp/AMPEG4AudioAssembler.h +++ b/netwerk/protocol/rtsp/rtsp/AMPEG4AudioAssembler.h @@ -18,6 +18,7 @@ #define A_MPEG4_AUDIO_ASSEMBLER_H_ +#include "mozilla/Types.h" #include "ARTPAssembler.h" #include @@ -26,8 +27,8 @@ namespace android { -struct AMessage; -struct AString; +struct MOZ_EXPORT AMessage; +struct MOZ_EXPORT AString; struct AMPEG4AudioAssembler : public ARTPAssembler { AMPEG4AudioAssembler( diff --git a/netwerk/protocol/rtsp/rtsp/AMPEG4ElementaryAssembler.h b/netwerk/protocol/rtsp/rtsp/AMPEG4ElementaryAssembler.h index 3f04ca8193d..116eb7a7a05 100644 --- a/netwerk/protocol/rtsp/rtsp/AMPEG4ElementaryAssembler.h +++ b/netwerk/protocol/rtsp/rtsp/AMPEG4ElementaryAssembler.h @@ -18,6 +18,7 @@ #define A_MPEG4_ELEM_ASSEMBLER_H_ +#include "mozilla/Types.h" #include "ARTPAssembler.h" #include @@ -27,8 +28,8 @@ namespace android { -struct ABuffer; -struct AMessage; +struct MOZ_EXPORT ABuffer; +struct MOZ_EXPORT AMessage; struct AMPEG4ElementaryAssembler : public ARTPAssembler { AMPEG4ElementaryAssembler( diff --git a/netwerk/protocol/rtsp/rtsp/ARTPAssembler.h b/netwerk/protocol/rtsp/rtsp/ARTPAssembler.h index 70ea1866736..17d27003699 100644 --- a/netwerk/protocol/rtsp/rtsp/ARTPAssembler.h +++ b/netwerk/protocol/rtsp/rtsp/ARTPAssembler.h @@ -18,12 +18,13 @@ #define A_RTP_ASSEMBLER_H_ +#include "mozilla/Types.h" #include #include namespace android { -struct ABuffer; +struct MOZ_EXPORT ABuffer; struct ARTPSource; struct ARTPAssembler : public RefBase { diff --git a/netwerk/protocol/rtsp/rtsp/ARTPConnection.h b/netwerk/protocol/rtsp/rtsp/ARTPConnection.h index edbcc35d284..e33e49a2ebc 100644 --- a/netwerk/protocol/rtsp/rtsp/ARTPConnection.h +++ b/netwerk/protocol/rtsp/rtsp/ARTPConnection.h @@ -18,12 +18,13 @@ #define A_RTP_CONNECTION_H_ +#include "mozilla/Types.h" #include #include namespace android { -struct ABuffer; +struct MOZ_EXPORT ABuffer; struct ARTPSource; struct ASessionDescription; diff --git a/netwerk/protocol/rtsp/rtsp/ARTPSession.h b/netwerk/protocol/rtsp/rtsp/ARTPSession.h index 9bff74c48d6..9f1979f3375 100644 --- a/netwerk/protocol/rtsp/rtsp/ARTPSession.h +++ b/netwerk/protocol/rtsp/rtsp/ARTPSession.h @@ -18,6 +18,7 @@ #define A_RTP_SESSION_H_ +#include "mozilla/Types.h" #include namespace android { @@ -25,7 +26,7 @@ namespace android { struct APacketSource; struct ARTPConnection; struct ASessionDescription; -struct MediaSource; +struct MOZ_EXPORT MediaSource; struct ARTPSession : public AHandler { ARTPSession(); diff --git a/netwerk/protocol/rtsp/rtsp/ARTPSource.h b/netwerk/protocol/rtsp/rtsp/ARTPSource.h index b70f94e496c..6fe10e87f10 100644 --- a/netwerk/protocol/rtsp/rtsp/ARTPSource.h +++ b/netwerk/protocol/rtsp/rtsp/ARTPSource.h @@ -18,6 +18,7 @@ #define A_RTP_SOURCE_H_ +#include "mozilla/Types.h" #include #include @@ -26,8 +27,8 @@ namespace android { -struct ABuffer; -struct AMessage; +struct MOZ_EXPORT ABuffer; +struct MOZ_EXPORT AMessage; struct ARTPAssembler; struct ASessionDescription; diff --git a/netwerk/protocol/rtsp/rtsp/ARTPWriter.h b/netwerk/protocol/rtsp/rtsp/ARTPWriter.h index fdc8d230fda..ed2416a6381 100644 --- a/netwerk/protocol/rtsp/rtsp/ARTPWriter.h +++ b/netwerk/protocol/rtsp/rtsp/ARTPWriter.h @@ -18,6 +18,7 @@ #define A_RTP_WRITER_H_ +#include "mozilla/Types.h" #include #include #include @@ -31,8 +32,8 @@ namespace android { -struct ABuffer; -struct MediaBuffer; +struct MOZ_EXPORT ABuffer; +struct MOZ_EXPORT MediaBuffer; struct ARTPWriter : public MediaWriter { ARTPWriter(int fd); diff --git a/netwerk/protocol/rtsp/rtsp/ARTSPConnection.h b/netwerk/protocol/rtsp/rtsp/ARTSPConnection.h index f161e234894..ab178b5938c 100644 --- a/netwerk/protocol/rtsp/rtsp/ARTSPConnection.h +++ b/netwerk/protocol/rtsp/rtsp/ARTSPConnection.h @@ -18,12 +18,13 @@ #define A_RTSP_CONNECTION_H_ +#include "mozilla/Types.h" #include #include namespace android { -struct ABuffer; +struct MOZ_EXPORT ABuffer; struct ARTSPResponse : public RefBase { unsigned long mStatusCode; diff --git a/netwerk/protocol/rtsp/rtsp/ARawAudioAssembler.h b/netwerk/protocol/rtsp/rtsp/ARawAudioAssembler.h index ed7af080c57..89a94ec2170 100644 --- a/netwerk/protocol/rtsp/rtsp/ARawAudioAssembler.h +++ b/netwerk/protocol/rtsp/rtsp/ARawAudioAssembler.h @@ -18,13 +18,14 @@ #define A_RAW_AUDIO_ASSEMBLER_H_ +#include "mozilla/Types.h" #include "ARTPAssembler.h" namespace android { -struct AMessage; -struct AString; -struct MetaData; +struct MOZ_EXPORT AMessage; +struct MOZ_EXPORT AString; +struct MOZ_EXPORT MetaData; struct ARawAudioAssembler : public ARTPAssembler { ARawAudioAssembler( diff --git a/netwerk/protocol/rtsp/rtsp/ASessionDescription.h b/netwerk/protocol/rtsp/rtsp/ASessionDescription.h index b4629834b68..ba3927502cb 100644 --- a/netwerk/protocol/rtsp/rtsp/ASessionDescription.h +++ b/netwerk/protocol/rtsp/rtsp/ASessionDescription.h @@ -18,6 +18,7 @@ #define A_SESSION_DESCRIPTION_H_ +#include "mozilla/Types.h" #include #include @@ -27,7 +28,7 @@ namespace android { -struct AString; +struct MOZ_EXPORT AString; struct ASessionDescription : public RefBase { ASessionDescription(); diff --git a/netwerk/protocol/rtsp/rtsp/RTSPSource.h b/netwerk/protocol/rtsp/rtsp/RTSPSource.h index 46e734081be..6db8e3d6e04 100644 --- a/netwerk/protocol/rtsp/rtsp/RTSPSource.h +++ b/netwerk/protocol/rtsp/rtsp/RTSPSource.h @@ -18,6 +18,7 @@ #define RTSP_SOURCE_H_ +#include "mozilla/Types.h" #include #include #include @@ -29,10 +30,10 @@ namespace android { -struct MetaData; -struct ABuffer; -struct ALooper; -struct AnotherPacketSource; +struct MOZ_EXPORT MetaData; +struct MOZ_EXPORT ABuffer; +struct MOZ_EXPORT ALooper; +struct MOZ_EXPORT AnotherPacketSource; struct RtspConnectionHandler; class RTSPSource : public RefBase diff --git a/toolkit/mozapps/update/updater/updater.cpp b/toolkit/mozapps/update/updater/updater.cpp index 0a6402438cb..6a77ae9463c 100644 --- a/toolkit/mozapps/update/updater/updater.cpp +++ b/toolkit/mozapps/update/updater/updater.cpp @@ -54,6 +54,7 @@ #include "updatelogging.h" #include "mozilla/Compiler.h" +#include "mozilla/Types.h" // Amount of the progress bar to use in each of the 3 update stages, // should total 100.0. @@ -99,7 +100,7 @@ void LaunchMacPostProcess(const char* aAppExe); // The only header file in bionic which has a function prototype for ioprio_set // is libc/include/sys/linux-unistd.h. However, linux-unistd.h conflicts // badly with unistd.h, so we declare the prototype for ioprio_set directly. -extern "C" int ioprio_set(int which, int who, int ioprio); +extern "C" MOZ_EXPORT int ioprio_set(int which, int who, int ioprio); # define MAYBE_USE_HARD_LINKS 1 static bool sUseHardLinks = true; diff --git a/tools/profiler/shared-libraries-linux.cc b/tools/profiler/shared-libraries-linux.cc index b35dfe6bd03..b998fbe6936 100644 --- a/tools/profiler/shared-libraries-linux.cc +++ b/tools/profiler/shared-libraries-linux.cc @@ -28,7 +28,7 @@ #include #ifdef ANDROID -extern "C" __attribute__((weak)) +extern "C" MOZ_EXPORT __attribute__((weak)) int dl_iterate_phdr( int (*callback) (struct dl_phdr_info *info, size_t size, void *data), diff --git a/widget/android/AndroidBridge.h b/widget/android/AndroidBridge.h index 2e691b1cd7a..97d8260380e 100644 --- a/widget/android/AndroidBridge.h +++ b/widget/android/AndroidBridge.h @@ -28,6 +28,7 @@ #include "mozilla/StaticPtr.h" #include "mozilla/layers/GeckoContentController.h" #include "mozilla/TimeStamp.h" +#include "mozilla/Types.h" // Some debug #defines // #define DEBUG_ANDROID_EVENTS @@ -38,7 +39,7 @@ class nsIDOMMozSmsMessage; class nsIObserver; /* See the comment in AndroidBridge about this function before using it */ -extern "C" JNIEnv * GetJNIForThread(); +extern "C" MOZ_EXPORT JNIEnv * GetJNIForThread(); extern bool mozilla_AndroidBridge_SetMainThread(pthread_t); diff --git a/widget/android/AndroidJNIWrapper.h b/widget/android/AndroidJNIWrapper.h index c9677128784..90bca26939d 100644 --- a/widget/android/AndroidJNIWrapper.h +++ b/widget/android/AndroidJNIWrapper.h @@ -6,10 +6,11 @@ #ifndef AndroidJNIWrapper_h__ #define AndroidJNIWrapper_h__ +#include "mozilla/Types.h" #include #include -extern "C" jclass jsjni_FindClass(const char *className); +extern "C" MOZ_EXPORT jclass jsjni_FindClass(const char *className); /** * JNIEnv::FindClass alternative. @@ -18,16 +19,16 @@ extern "C" jclass jsjni_FindClass(const char *className); * The caller is responsible for ensuring that the class is not leaked by * calling DeleteGlobalRef at an appropriate time. */ -extern "C" jclass jsjni_GetGlobalClassRef(const char *className); +extern "C" MOZ_EXPORT jclass jsjni_GetGlobalClassRef(const char *className); -extern "C" jmethodID jsjni_GetStaticMethodID(jclass methodClass, +extern "C" MOZ_EXPORT jmethodID jsjni_GetStaticMethodID(jclass methodClass, const char *methodName, const char *signature); -extern "C" bool jsjni_ExceptionCheck(); -extern "C" void jsjni_CallStaticVoidMethodA(jclass cls, jmethodID method, jvalue *values); -extern "C" int jsjni_CallStaticIntMethodA(jclass cls, jmethodID method, jvalue *values); -extern "C" jobject jsjni_GetGlobalContextRef(); -extern "C" JavaVM* jsjni_GetVM(); -extern "C" JNIEnv* jsjni_GetJNIForThread(); +extern "C" MOZ_EXPORT bool jsjni_ExceptionCheck(); +extern "C" MOZ_EXPORT void jsjni_CallStaticVoidMethodA(jclass cls, jmethodID method, jvalue *values); +extern "C" MOZ_EXPORT int jsjni_CallStaticIntMethodA(jclass cls, jmethodID method, jvalue *values); +extern "C" MOZ_EXPORT jobject jsjni_GetGlobalContextRef(); +extern "C" MOZ_EXPORT JavaVM* jsjni_GetVM(); +extern "C" MOZ_EXPORT JNIEnv* jsjni_GetJNIForThread(); #endif /* AndroidJNIWrapper_h__ */ diff --git a/widget/gonk/libdisplay/GonkDisplay.h b/widget/gonk/libdisplay/GonkDisplay.h index d95ec3f06fa..2443cfee000 100644 --- a/widget/gonk/libdisplay/GonkDisplay.h +++ b/widget/gonk/libdisplay/GonkDisplay.h @@ -17,6 +17,7 @@ #define GONKDISPLAY_H #include +#include "mozilla/Types.h" namespace mozilla { @@ -27,7 +28,7 @@ class Layer; typedef void * EGLDisplay; typedef void * EGLSurface; -class GonkDisplay { +class MOZ_EXPORT GonkDisplay { public: virtual ANativeWindow* GetNativeWindow() = 0; @@ -66,7 +67,7 @@ public: uint32_t surfaceformat; }; -__attribute__ ((weak)) +MOZ_EXPORT __attribute__ ((weak)) GonkDisplay* GetGonkDisplay(); } diff --git a/widget/gonk/libdisplay/GonkDisplayICS.h b/widget/gonk/libdisplay/GonkDisplayICS.h index fd79fdee58d..aaa4ec15cbb 100644 --- a/widget/gonk/libdisplay/GonkDisplayICS.h +++ b/widget/gonk/libdisplay/GonkDisplayICS.h @@ -25,7 +25,7 @@ namespace mozilla { -class GonkDisplayICS : public GonkDisplay { +class MOZ_EXPORT GonkDisplayICS : public GonkDisplay { public: GonkDisplayICS(); ~GonkDisplayICS(); diff --git a/widget/gonk/libdisplay/GonkDisplayJB.h b/widget/gonk/libdisplay/GonkDisplayJB.h index 95e92b1a548..c09ba75e495 100644 --- a/widget/gonk/libdisplay/GonkDisplayJB.h +++ b/widget/gonk/libdisplay/GonkDisplayJB.h @@ -25,7 +25,7 @@ namespace mozilla { -class GonkDisplayJB : public GonkDisplay { +class MOZ_EXPORT GonkDisplayJB : public GonkDisplay { public: GonkDisplayJB(); ~GonkDisplayJB();