Bug 1006248. Part 1: Add MOZ_EXPORT in various places. r=glandium

--HG--
extra : rebase_source : cfe209a412cae28d405eae413415cebb6959072a
This commit is contained in:
Robert O'Callahan 2014-05-06 17:26:46 +12:00
parent 5f2882b16e
commit 949537330f
30 changed files with 76 additions and 54 deletions

View File

@ -15,7 +15,7 @@
namespace android {
class OmxDecoder;
class MediaExtractor;
class MOZ_EXPORT MediaExtractor;
}
namespace mozilla {

View File

@ -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 {

View File

@ -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);
}

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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)
{

View File

@ -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

View File

@ -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

View File

@ -18,6 +18,7 @@
#define A_AMR_ASSEMBLER_H_
#include "mozilla/Types.h"
#include "ARTPAssembler.h"
#include <utils/List.h>
@ -26,8 +27,8 @@
namespace android {
struct AMessage;
struct AString;
struct MOZ_EXPORT AMessage;
struct MOZ_EXPORT AString;
struct AAMRAssembler : public ARTPAssembler {
AAMRAssembler(

View File

@ -18,6 +18,7 @@
#define A_AVC_ASSEMBLER_H_
#include "mozilla/Types.h"
#include "ARTPAssembler.h"
#include <utils/List.h>
@ -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<AMessage> &notify);

View File

@ -18,6 +18,7 @@
#define A_H263_ASSEMBLER_H_
#include "mozilla/Types.h"
#include "ARTPAssembler.h"
#include <utils/List.h>
@ -26,7 +27,7 @@
namespace android {
struct AMessage;
struct MOZ_EXPORT AMessage;
struct AH263Assembler : public ARTPAssembler {
AH263Assembler(const sp<AMessage> &notify);

View File

@ -18,6 +18,7 @@
#define A_MPEG4_AUDIO_ASSEMBLER_H_
#include "mozilla/Types.h"
#include "ARTPAssembler.h"
#include <utils/List.h>
@ -26,8 +27,8 @@
namespace android {
struct AMessage;
struct AString;
struct MOZ_EXPORT AMessage;
struct MOZ_EXPORT AString;
struct AMPEG4AudioAssembler : public ARTPAssembler {
AMPEG4AudioAssembler(

View File

@ -18,6 +18,7 @@
#define A_MPEG4_ELEM_ASSEMBLER_H_
#include "mozilla/Types.h"
#include "ARTPAssembler.h"
#include <media/stagefright/foundation/AString.h>
@ -27,8 +28,8 @@
namespace android {
struct ABuffer;
struct AMessage;
struct MOZ_EXPORT ABuffer;
struct MOZ_EXPORT AMessage;
struct AMPEG4ElementaryAssembler : public ARTPAssembler {
AMPEG4ElementaryAssembler(

View File

@ -18,12 +18,13 @@
#define A_RTP_ASSEMBLER_H_
#include "mozilla/Types.h"
#include <media/stagefright/foundation/ABase.h>
#include <utils/RefBase.h>
namespace android {
struct ABuffer;
struct MOZ_EXPORT ABuffer;
struct ARTPSource;
struct ARTPAssembler : public RefBase {

View File

@ -18,12 +18,13 @@
#define A_RTP_CONNECTION_H_
#include "mozilla/Types.h"
#include <media/stagefright/foundation/AHandler.h>
#include <utils/List.h>
namespace android {
struct ABuffer;
struct MOZ_EXPORT ABuffer;
struct ARTPSource;
struct ASessionDescription;

View File

@ -18,6 +18,7 @@
#define A_RTP_SESSION_H_
#include "mozilla/Types.h"
#include <media/stagefright/foundation/AHandler.h>
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();

View File

@ -18,6 +18,7 @@
#define A_RTP_SOURCE_H_
#include "mozilla/Types.h"
#include <stdint.h>
#include <media/stagefright/foundation/ABase.h>
@ -26,8 +27,8 @@
namespace android {
struct ABuffer;
struct AMessage;
struct MOZ_EXPORT ABuffer;
struct MOZ_EXPORT AMessage;
struct ARTPAssembler;
struct ASessionDescription;

View File

@ -18,6 +18,7 @@
#define A_RTP_WRITER_H_
#include "mozilla/Types.h"
#include <media/stagefright/foundation/ABase.h>
#include <media/stagefright/foundation/AHandlerReflector.h>
#include <media/stagefright/foundation/AString.h>
@ -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);

View File

@ -18,12 +18,13 @@
#define A_RTSP_CONNECTION_H_
#include "mozilla/Types.h"
#include <media/stagefright/foundation/AHandler.h>
#include <media/stagefright/foundation/AString.h>
namespace android {
struct ABuffer;
struct MOZ_EXPORT ABuffer;
struct ARTSPResponse : public RefBase {
unsigned long mStatusCode;

View File

@ -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(

View File

@ -18,6 +18,7 @@
#define A_SESSION_DESCRIPTION_H_
#include "mozilla/Types.h"
#include <sys/types.h>
#include <media/stagefright/foundation/ABase.h>
@ -27,7 +28,7 @@
namespace android {
struct AString;
struct MOZ_EXPORT AString;
struct ASessionDescription : public RefBase {
ASessionDescription();

View File

@ -18,6 +18,7 @@
#define RTSP_SOURCE_H_
#include "mozilla/Types.h"
#include <utils/RefBase.h>
#include <media/stagefright/foundation/AString.h>
#include <media/stagefright/foundation/AHandlerReflector.h>
@ -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

View File

@ -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;

View File

@ -28,7 +28,7 @@
#include <sys/types.h>
#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),

View File

@ -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);

View File

@ -6,10 +6,11 @@
#ifndef AndroidJNIWrapper_h__
#define AndroidJNIWrapper_h__
#include "mozilla/Types.h"
#include <jni.h>
#include <android/log.h>
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__ */

View File

@ -17,6 +17,7 @@
#define GONKDISPLAY_H
#include <system/window.h>
#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();
}

View File

@ -25,7 +25,7 @@
namespace mozilla {
class GonkDisplayICS : public GonkDisplay {
class MOZ_EXPORT GonkDisplayICS : public GonkDisplay {
public:
GonkDisplayICS();
~GonkDisplayICS();

View File

@ -25,7 +25,7 @@
namespace mozilla {
class GonkDisplayJB : public GonkDisplay {
class MOZ_EXPORT GonkDisplayJB : public GonkDisplay {
public:
GonkDisplayJB();
~GonkDisplayJB();