8201226: missing JNIEXPORT / JNICALL at some places in function declarations/implementations
Co-authored-by: Alexey Ivanov <alexey.ivanov@oracle.com> Reviewed-by: ihse, mdoerr
This commit is contained in:
parent
a9b0242eef
commit
cfcd657702
@ -80,13 +80,13 @@
|
||||
|
||||
// Entry points in zip.dll for loading zip/jar file entries
|
||||
|
||||
typedef void * * (JNICALL *ZipOpen_t)(const char *name, char **pmsg);
|
||||
typedef void (JNICALL *ZipClose_t)(jzfile *zip);
|
||||
typedef jzentry* (JNICALL *FindEntry_t)(jzfile *zip, const char *name, jint *sizeP, jint *nameLen);
|
||||
typedef jboolean (JNICALL *ReadEntry_t)(jzfile *zip, jzentry *entry, unsigned char *buf, char *namebuf);
|
||||
typedef jzentry* (JNICALL *GetNextEntry_t)(jzfile *zip, jint n);
|
||||
typedef jboolean (JNICALL *ZipInflateFully_t)(void *inBuf, jlong inLen, void *outBuf, jlong outLen, char **pmsg);
|
||||
typedef jint (JNICALL *Crc32_t)(jint crc, const jbyte *buf, jint len);
|
||||
typedef void * * (*ZipOpen_t)(const char *name, char **pmsg);
|
||||
typedef void (*ZipClose_t)(jzfile *zip);
|
||||
typedef jzentry* (*FindEntry_t)(jzfile *zip, const char *name, jint *sizeP, jint *nameLen);
|
||||
typedef jboolean (*ReadEntry_t)(jzfile *zip, jzentry *entry, unsigned char *buf, char *namebuf);
|
||||
typedef jzentry* (*GetNextEntry_t)(jzfile *zip, jint n);
|
||||
typedef jboolean (*ZipInflateFully_t)(void *inBuf, jlong inLen, void *outBuf, jlong outLen, char **pmsg);
|
||||
typedef jint (*Crc32_t)(jint crc, const jbyte *buf, jint len);
|
||||
|
||||
static ZipOpen_t ZipOpen = NULL;
|
||||
static ZipClose_t ZipClose = NULL;
|
||||
|
@ -93,7 +93,7 @@ WinMain(HINSTANCE inst, HINSTANCE previnst, LPSTR cmdline, int cmdshow)
|
||||
__initenv = _environ;
|
||||
|
||||
#else /* JAVAW */
|
||||
JNIEXPORT int JNICALL
|
||||
JNIEXPORT int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int margc;
|
||||
|
@ -55,7 +55,7 @@
|
||||
* }
|
||||
* ...
|
||||
*/
|
||||
extern "C" JNIEXPORT JImageFile* JNICALL
|
||||
extern "C" JNIEXPORT JImageFile*
|
||||
JIMAGE_Open(const char *name, jint* error) {
|
||||
// TODO - return a meaningful error code
|
||||
*error = 0;
|
||||
@ -72,7 +72,7 @@ JIMAGE_Open(const char *name, jint* error) {
|
||||
* Ex.
|
||||
* (*JImageClose)(image);
|
||||
*/
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
extern "C" JNIEXPORT void
|
||||
JIMAGE_Close(JImageFile* image) {
|
||||
ImageFileReader::close((ImageFileReader*) image);
|
||||
}
|
||||
@ -89,7 +89,7 @@ JIMAGE_Close(JImageFile* image) {
|
||||
* tty->print_cr(package);
|
||||
* -> java.base
|
||||
*/
|
||||
extern "C" JNIEXPORT const char* JNICALL
|
||||
extern "C" JNIEXPORT const char*
|
||||
JIMAGE_PackageToModule(JImageFile* image, const char* package_name) {
|
||||
return ((ImageFileReader*) image)->get_image_module_data()->package_to_module(package_name);
|
||||
}
|
||||
@ -108,7 +108,7 @@ JIMAGE_PackageToModule(JImageFile* image, const char* package_name) {
|
||||
* JImageLocationRef location = (*JImageFindResource)(image,
|
||||
* "java.base", "9.0", "java/lang/String.class", &size);
|
||||
*/
|
||||
extern "C" JNIEXPORT JImageLocationRef JNICALL
|
||||
extern "C" JNIEXPORT JImageLocationRef
|
||||
JIMAGE_FindResource(JImageFile* image,
|
||||
const char* module_name, const char* version, const char* name,
|
||||
jlong* size) {
|
||||
@ -155,7 +155,7 @@ JIMAGE_FindResource(JImageFile* image,
|
||||
* char* buffer = new char[size];
|
||||
* (*JImageGetResource)(image, location, buffer, size);
|
||||
*/
|
||||
extern "C" JNIEXPORT jlong JNICALL
|
||||
extern "C" JNIEXPORT jlong
|
||||
JIMAGE_GetResource(JImageFile* image, JImageLocationRef location,
|
||||
char* buffer, jlong size) {
|
||||
((ImageFileReader*) image)->get_resource((u4) location, (u1*) buffer);
|
||||
@ -184,7 +184,7 @@ JIMAGE_GetResource(JImageFile* image, JImageLocationRef location,
|
||||
* }
|
||||
* (*JImageResourceIterator)(image, ctw_visitor, loader);
|
||||
*/
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
extern "C" JNIEXPORT void
|
||||
JIMAGE_ResourceIterator(JImageFile* image,
|
||||
JImageResourceVisitor_t visitor, void* arg) {
|
||||
ImageFileReader* imageFile = (ImageFileReader*) image;
|
||||
@ -226,7 +226,7 @@ JIMAGE_ResourceIterator(JImageFile* image,
|
||||
* char path[JIMAGE_MAX_PATH];
|
||||
* (*JImageResourcePath)(image, location, path, JIMAGE_MAX_PATH);
|
||||
*/
|
||||
extern "C" JNIEXPORT bool JNICALL
|
||||
extern "C" JNIEXPORT bool
|
||||
JIMAGE_ResourcePath(JImageFile* image, JImageLocationRef locationRef,
|
||||
char* path, size_t max) {
|
||||
ImageFileReader* imageFile = (ImageFileReader*) image;
|
||||
|
@ -72,7 +72,7 @@ typedef jlong JImageLocationRef;
|
||||
* ...
|
||||
*/
|
||||
|
||||
extern "C" JNIEXPORT JImageFile* JNICALL
|
||||
extern "C" JNIEXPORT JImageFile*
|
||||
JIMAGE_Open(const char *name, jint* error);
|
||||
|
||||
typedef JImageFile* (*JImageOpen_t)(const char *name, jint* error);
|
||||
@ -87,7 +87,7 @@ typedef JImageFile* (*JImageOpen_t)(const char *name, jint* error);
|
||||
* (*JImageClose)(image);
|
||||
*/
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
extern "C" JNIEXPORT void
|
||||
JIMAGE_Close(JImageFile* jimage);
|
||||
|
||||
typedef void (*JImageClose_t)(JImageFile* jimage);
|
||||
@ -106,7 +106,7 @@ typedef void (*JImageClose_t)(JImageFile* jimage);
|
||||
* -> java.base
|
||||
*/
|
||||
|
||||
extern "C" JNIEXPORT const char * JNICALL
|
||||
extern "C" JNIEXPORT const char *
|
||||
JIMAGE_PackageToModule(JImageFile* jimage, const char* package_name);
|
||||
|
||||
typedef const char* (*JImagePackageToModule_t)(JImageFile* jimage, const char* package_name);
|
||||
@ -150,7 +150,7 @@ typedef JImageLocationRef(*JImageFindResource_t)(JImageFile* jimage,
|
||||
* char* buffer = new char[size];
|
||||
* (*JImageGetResource)(image, location, buffer, size);
|
||||
*/
|
||||
extern "C" JNIEXPORT jlong JNICALL
|
||||
extern "C" JNIEXPORT jlong
|
||||
JIMAGE_GetResource(JImageFile* jimage, JImageLocationRef location,
|
||||
char* buffer, jlong size);
|
||||
|
||||
@ -185,7 +185,7 @@ typedef bool (*JImageResourceVisitor_t)(JImageFile* jimage,
|
||||
const char* module_name, const char* version, const char* package,
|
||||
const char* name, const char* extension, void* arg);
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
extern "C" JNIEXPORT void
|
||||
JIMAGE_ResourceIterator(JImageFile* jimage,
|
||||
JImageResourceVisitor_t visitor, void *arg);
|
||||
|
||||
@ -202,7 +202,7 @@ typedef void (*JImageResourceIterator_t)(JImageFile* jimage,
|
||||
* char path[JIMAGE_MAX_PATH];
|
||||
* (*JImageResourcePath)(image, location, path, JIMAGE_MAX_PATH);
|
||||
*/
|
||||
extern "C" JNIEXPORT bool JNICALL
|
||||
extern "C" JNIEXPORT bool
|
||||
JIMAGE_ResourcePath(JImageFile* image, JImageLocationRef locationRef,
|
||||
char* path, size_t max);
|
||||
|
||||
|
@ -54,7 +54,7 @@ Java_java_util_zip_CRC32_updateBytes0(JNIEnv *env, jclass cls, jint crc,
|
||||
return crc;
|
||||
}
|
||||
|
||||
JNIEXPORT jint JNICALL
|
||||
JNIEXPORT jint
|
||||
ZIP_CRC32(jint crc, const jbyte *buf, jint len)
|
||||
{
|
||||
return crc32(crc, (Bytef*)buf, len);
|
||||
|
@ -881,7 +881,7 @@ ZIP_Put_In_Cache0(const char *name, ZFILE zfd, char **pmsg, jlong lastModified,
|
||||
* set to the error message text if msg != 0. Otherwise, *msg will be
|
||||
* set to NULL. Caller doesn't need to free the error message.
|
||||
*/
|
||||
JNIEXPORT jzfile * JNICALL
|
||||
JNIEXPORT jzfile *
|
||||
ZIP_Open(const char *name, char **pmsg)
|
||||
{
|
||||
jzfile *file = ZIP_Open_Generic(name, pmsg, O_RDONLY, 0);
|
||||
@ -895,7 +895,7 @@ ZIP_Open(const char *name, char **pmsg)
|
||||
/*
|
||||
* Closes the specified zip file object.
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
JNIEXPORT void
|
||||
ZIP_Close(jzfile *zip)
|
||||
{
|
||||
MLOCK(zfiles_lock);
|
||||
@ -1115,7 +1115,7 @@ ZIP_FreeEntry(jzfile *jz, jzentry *ze)
|
||||
* Returns the zip entry corresponding to the specified name, or
|
||||
* NULL if not found.
|
||||
*/
|
||||
JNIEXPORT jzentry * JNICALL
|
||||
JNIEXPORT jzentry *
|
||||
ZIP_GetEntry(jzfile *zip, char *name, jint ulen)
|
||||
{
|
||||
if (ulen == 0) {
|
||||
@ -1238,7 +1238,7 @@ Finally:
|
||||
* Returns the n'th (starting at zero) zip file entry, or NULL if the
|
||||
* specified index was out of range.
|
||||
*/
|
||||
JNIEXPORT jzentry * JNICALL
|
||||
JNIEXPORT jzentry *
|
||||
ZIP_GetNextEntry(jzfile *zip, jint n)
|
||||
{
|
||||
jzentry *result;
|
||||
@ -1439,7 +1439,7 @@ InflateFully(jzfile *zip, jzentry *entry, void *buf, char **msg)
|
||||
* The current implementation does not support reading an entry that
|
||||
* has the size bigger than 2**32 bytes in ONE invocation.
|
||||
*/
|
||||
JNIEXPORT jzentry * JNICALL
|
||||
JNIEXPORT jzentry *
|
||||
ZIP_FindEntry(jzfile *zip, char *name, jint *sizeP, jint *nameLenP)
|
||||
{
|
||||
jzentry *entry = ZIP_GetEntry(zip, name, 0);
|
||||
@ -1456,7 +1456,7 @@ ZIP_FindEntry(jzfile *zip, char *name, jint *sizeP, jint *nameLenP)
|
||||
* Note: this is called from the separately delivered VM (hotspot/classic)
|
||||
* so we have to be careful to maintain the expected behaviour.
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL
|
||||
JNIEXPORT jboolean
|
||||
ZIP_ReadEntry(jzfile *zip, jzentry *entry, unsigned char *buf, char *entryname)
|
||||
{
|
||||
char *msg;
|
||||
@ -1515,7 +1515,7 @@ ZIP_ReadEntry(jzfile *zip, jzentry *entry, unsigned char *buf, char *entryname)
|
||||
return JNI_TRUE;
|
||||
}
|
||||
|
||||
JNIEXPORT jboolean JNICALL
|
||||
JNIEXPORT jboolean
|
||||
ZIP_InflateFully(void *inBuf, jlong inLen, void *outBuf, jlong outLen, char **pmsg)
|
||||
{
|
||||
z_stream strm;
|
||||
|
@ -241,16 +241,16 @@ typedef struct jzfile { /* Zip file */
|
||||
*/
|
||||
#define ZIP_ENDCHAIN ((jint)-1)
|
||||
|
||||
JNIEXPORT jzentry * JNICALL
|
||||
JNIEXPORT jzentry *
|
||||
ZIP_FindEntry(jzfile *zip, char *name, jint *sizeP, jint *nameLenP);
|
||||
|
||||
JNIEXPORT jboolean JNICALL
|
||||
JNIEXPORT jboolean
|
||||
ZIP_ReadEntry(jzfile *zip, jzentry *entry, unsigned char *buf, char *entrynm);
|
||||
|
||||
JNIEXPORT jzentry * JNICALL
|
||||
JNIEXPORT jzentry *
|
||||
ZIP_GetNextEntry(jzfile *zip, jint n);
|
||||
|
||||
JNIEXPORT jzfile * JNICALL
|
||||
JNIEXPORT jzfile *
|
||||
ZIP_Open(const char *name, char **pmsg);
|
||||
|
||||
jzfile *
|
||||
@ -265,10 +265,10 @@ ZIP_Put_In_Cache(const char *name, ZFILE zfd, char **pmsg, jlong lastModified);
|
||||
jzfile *
|
||||
ZIP_Put_In_Cache0(const char *name, ZFILE zfd, char **pmsg, jlong lastModified, jboolean usemmap);
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
JNIEXPORT void
|
||||
ZIP_Close(jzfile *zip);
|
||||
|
||||
JNIEXPORT jzentry * JNICALL
|
||||
JNIEXPORT jzentry *
|
||||
ZIP_GetEntry(jzfile *zip, char *name, jint ulen);
|
||||
JNIEXPORT void JNICALL
|
||||
ZIP_Lock(jzfile *zip);
|
||||
@ -281,7 +281,7 @@ ZIP_FreeEntry(jzfile *zip, jzentry *ze);
|
||||
jlong ZIP_GetEntryDataOffset(jzfile *zip, jzentry *entry);
|
||||
jzentry * ZIP_GetEntry2(jzfile *zip, char *name, jint ulen, jboolean addSlash);
|
||||
|
||||
JNIEXPORT jboolean JNICALL
|
||||
JNIEXPORT jboolean
|
||||
ZIP_InflateFully(void *inBuf, jlong inLen, void *outBuf, jlong outLen, char **pmsg);
|
||||
|
||||
#endif /* !_ZIP_H_ */
|
||||
|
@ -227,7 +227,7 @@ mlib_image* mlib_ImageSet(mlib_image *image,
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
mlib_image *mlib_ImageCreateStruct(mlib_type type,
|
||||
JNIEXPORT mlib_image* JNICALL mlib_ImageCreateStruct(mlib_type type,
|
||||
mlib_s32 channels,
|
||||
mlib_s32 width,
|
||||
mlib_s32 height,
|
||||
@ -253,7 +253,7 @@ mlib_image *mlib_ImageCreateStruct(mlib_type type,
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
mlib_image *mlib_ImageCreate(mlib_type type,
|
||||
JNIEXPORT mlib_image* JNICALL mlib_ImageCreate(mlib_type type,
|
||||
mlib_s32 channels,
|
||||
mlib_s32 width,
|
||||
mlib_s32 height)
|
||||
@ -352,7 +352,7 @@ mlib_image *mlib_ImageCreate(mlib_type type,
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
void mlib_ImageDelete(mlib_image *img)
|
||||
JNIEXPORT void JNICALL mlib_ImageDelete(mlib_image *img)
|
||||
{
|
||||
if (img == NULL) return;
|
||||
if ((img -> flags & MLIB_IMAGE_USERALLOCATED) == 0) {
|
||||
|
@ -299,7 +299,7 @@ mlib_status mlib_ImageAffine_alltypes(mlib_image *dst,
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
mlib_status mlib_ImageAffine(mlib_image *dst,
|
||||
JNIEXPORT mlib_status JNICALL mlib_ImageAffine(mlib_image *dst,
|
||||
const mlib_image *src,
|
||||
const mlib_d64 *mtx,
|
||||
mlib_filter filter,
|
||||
|
@ -78,7 +78,7 @@
|
||||
#endif /* __sparc */
|
||||
|
||||
/***************************************************************/
|
||||
mlib_status mlib_ImageConvKernelConvert(mlib_s32 *ikernel,
|
||||
JNIEXPORT mlib_status JNICALL mlib_ImageConvKernelConvert(mlib_s32 *ikernel,
|
||||
mlib_s32 *iscale,
|
||||
const mlib_d64 *fkernel,
|
||||
mlib_s32 m,
|
||||
|
@ -90,7 +90,7 @@
|
||||
#include "mlib_ImageConvEdge.h"
|
||||
|
||||
/***************************************************************/
|
||||
mlib_status mlib_ImageConvMxN(mlib_image *dst,
|
||||
JNIEXPORT mlib_status JNICALL mlib_ImageConvMxN(mlib_image *dst,
|
||||
const mlib_image *src,
|
||||
const mlib_s32 *kernel,
|
||||
mlib_s32 m,
|
||||
|
@ -78,7 +78,7 @@
|
||||
#include "mlib_c_ImageLookUp.h"
|
||||
|
||||
/***************************************************************/
|
||||
mlib_status mlib_ImageLookUp(mlib_image *dst,
|
||||
JNIEXPORT mlib_status JNICALL mlib_ImageLookUp(mlib_image *dst,
|
||||
const mlib_image *src,
|
||||
const void **table)
|
||||
{
|
||||
|
@ -132,9 +132,6 @@ void SplashDonePlatform(Splash * splash);
|
||||
|
||||
unsigned SplashTime();
|
||||
char* SplashConvertStringAlloc(const char* in, int *size);
|
||||
jboolean SplashGetScaledImageName(const char* jarName,
|
||||
const char* fileName, float *scaleFactor,
|
||||
char *scaleImageName, const size_t scaledImageNameLength);
|
||||
void SplashLock(Splash * splash);
|
||||
void SplashUnlock(Splash * splash);
|
||||
|
||||
@ -157,8 +154,7 @@ void SplashDone(Splash * splash);
|
||||
void SplashUpdateScreenData(Splash * splash);
|
||||
|
||||
void SplashCleanup(Splash * splash);
|
||||
void SplashSetScaleFactor(float scaleFactor);
|
||||
int SplashGetScaledImgNameMaxPstfixLen(const char *fileName);
|
||||
|
||||
void cleanUp(char *fName, char *xName, char *pctName, float *scaleFactor);
|
||||
jboolean GetScaledImageName(const char *fileName, char *scaledImgName,
|
||||
float *scaleFactor, const size_t scaledImageLength);
|
||||
|
@ -574,7 +574,7 @@ SplashReconfigure(Splash * splash)
|
||||
PostMessage(splash->hWnd, WM_SPLASHRECONFIGURE, 0, 0);
|
||||
}
|
||||
|
||||
jboolean
|
||||
JNIEXPORT jboolean JNICALL
|
||||
SplashGetScaledImageName(const char* jarName, const char* fileName,
|
||||
float *scaleFactor, char *scaleImageName,
|
||||
const size_t scaledImageLength)
|
||||
|
@ -59,7 +59,7 @@
|
||||
#include "unpack.h"
|
||||
|
||||
|
||||
JNIEXPORT int JNICALL
|
||||
JNIEXPORT int
|
||||
main(int argc, char **argv) {
|
||||
return unpacker::run(argc, argv);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user