mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Add some const decorations to prototypes
Reviewed-by: Fabien COELHO <coelho@cri.ensmp.fr>
This commit is contained in:
@ -20,7 +20,7 @@
|
||||
#ifdef HAVE_DLOPEN
|
||||
|
||||
void *
|
||||
pg_dlopen(char *filename)
|
||||
pg_dlopen(const char *filename)
|
||||
{
|
||||
return dlopen(filename, RTLD_NOW | RTLD_GLOBAL);
|
||||
}
|
||||
@ -32,7 +32,7 @@ pg_dlclose(void *handle)
|
||||
}
|
||||
|
||||
PGFunction
|
||||
pg_dlsym(void *handle, char *funcname)
|
||||
pg_dlsym(void *handle, const char *funcname)
|
||||
{
|
||||
/* Do not prepend an underscore: see dlopen(3) */
|
||||
return dlsym(handle, funcname);
|
||||
@ -54,7 +54,7 @@ pg_dlerror(void)
|
||||
static NSObjectFileImageReturnCode cofiff_result = NSObjectFileImageFailure;
|
||||
|
||||
void *
|
||||
pg_dlopen(char *filename)
|
||||
pg_dlopen(const char *filename)
|
||||
{
|
||||
NSObjectFileImage image;
|
||||
|
||||
@ -73,7 +73,7 @@ pg_dlclose(void *handle)
|
||||
}
|
||||
|
||||
PGFunction
|
||||
pg_dlsym(void *handle, char *funcname)
|
||||
pg_dlsym(void *handle, const char *funcname)
|
||||
{
|
||||
NSSymbol symbol;
|
||||
char *symname = (char *) malloc(strlen(funcname) + 2);
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include "fmgr.h"
|
||||
|
||||
void *pg_dlopen(char *filename);
|
||||
PGFunction pg_dlsym(void *handle, char *funcname);
|
||||
void *pg_dlopen(const char *filename);
|
||||
PGFunction pg_dlsym(void *handle, const char *funcname);
|
||||
void pg_dlclose(void *handle);
|
||||
char *pg_dlerror(void);
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "utils/dynamic_loader.h"
|
||||
|
||||
void *
|
||||
pg_dlopen(char *filename)
|
||||
pg_dlopen(const char *filename)
|
||||
{
|
||||
/*
|
||||
* Use BIND_IMMEDIATE so that undefined symbols cause a failure return
|
||||
@ -41,7 +41,7 @@ pg_dlopen(char *filename)
|
||||
}
|
||||
|
||||
PGFunction
|
||||
pg_dlsym(void *handle, char *funcname)
|
||||
pg_dlsym(void *handle, const char *funcname)
|
||||
{
|
||||
PGFunction f;
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
/* System includes */
|
||||
#include "fmgr.h"
|
||||
|
||||
extern void *pg_dlopen(char *filename);
|
||||
extern PGFunction pg_dlsym(void *handle, char *funcname);
|
||||
extern void *pg_dlopen(const char *filename);
|
||||
extern PGFunction pg_dlsym(void *handle, const char *funcname);
|
||||
extern void pg_dlclose(void *handle);
|
||||
extern char *pg_dlerror(void);
|
||||
|
@ -29,7 +29,7 @@
|
||||
#ifndef HAVE_DLOPEN
|
||||
|
||||
void *
|
||||
pg_dlopen(char *filename)
|
||||
pg_dlopen(const char *filename)
|
||||
{
|
||||
#ifndef HAVE_DLD_H
|
||||
elog(ERROR, "dynamic load not supported");
|
||||
@ -101,7 +101,7 @@ pg_dlopen(char *filename)
|
||||
}
|
||||
|
||||
PGFunction
|
||||
pg_dlsym(void *handle, char *funcname)
|
||||
pg_dlsym(void *handle, const char *funcname)
|
||||
{
|
||||
#ifndef HAVE_DLD_H
|
||||
return NULL;
|
||||
|
Reference in New Issue
Block a user