__progname should be const char*, not char*.
Change-Id: I8e846872c30a712fbc05c8da59ffa1cec1be31a4
This commit is contained in:
parent
2f41531ff9
commit
e4ccf5a138
@ -34,7 +34,7 @@
|
|||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
extern char *__progname;
|
extern const char* __progname;
|
||||||
|
|
||||||
__noreturn void
|
__noreturn void
|
||||||
err(int eval, const char *fmt, ...)
|
err(int eval, const char *fmt, ...)
|
||||||
|
@ -46,7 +46,7 @@ extern "C" unsigned __get_sp(void);
|
|||||||
extern "C" int __system_properties_init(void);
|
extern "C" int __system_properties_init(void);
|
||||||
|
|
||||||
// Not public, but well-known in the BSDs.
|
// Not public, but well-known in the BSDs.
|
||||||
char* __progname;
|
const char* __progname;
|
||||||
|
|
||||||
// Declared in <unistd.h>
|
// Declared in <unistd.h>
|
||||||
char** environ;
|
char** environ;
|
||||||
@ -88,7 +88,7 @@ void __libc_init_common(KernelArgumentBlock& args) {
|
|||||||
environ = args.envp;
|
environ = args.envp;
|
||||||
errno = 0;
|
errno = 0;
|
||||||
__libc_auxv = args.auxv;
|
__libc_auxv = args.auxv;
|
||||||
__progname = args.argv[0] ? args.argv[0] : const_cast<char*>("<unknown>");
|
__progname = args.argv[0] ? args.argv[0] : "<unknown>";
|
||||||
|
|
||||||
// Get the main thread from TLS and add it to the thread list.
|
// Get the main thread from TLS and add it to the thread list.
|
||||||
pthread_internal_t* main_thread = __get_thread();
|
pthread_internal_t* main_thread = __get_thread();
|
||||||
|
@ -256,7 +256,7 @@ static MallocDebug gMallocUse __attribute__((aligned(32))) = {
|
|||||||
dlmalloc, dlfree, dlcalloc, dlrealloc, dlmemalign
|
dlmalloc, dlfree, dlcalloc, dlrealloc, dlmemalign
|
||||||
};
|
};
|
||||||
|
|
||||||
extern char* __progname;
|
extern const char* __progname;
|
||||||
|
|
||||||
/* Handle to shared library where actual memory allocation is implemented.
|
/* Handle to shared library where actual memory allocation is implemented.
|
||||||
* This library is loaded and memory allocation calls are redirected there
|
* This library is loaded and memory allocation calls are redirected there
|
||||||
|
@ -116,7 +116,7 @@ static const char* const kStartBanner =
|
|||||||
static const char* const kEndBanner =
|
static const char* const kEndBanner =
|
||||||
"===============================================================";
|
"===============================================================";
|
||||||
|
|
||||||
extern char* __progname;
|
extern const char* __progname;
|
||||||
|
|
||||||
#define STACK_TRACE_DEPTH 16
|
#define STACK_TRACE_DEPTH 16
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
static struct syslog_data sdata = SYSLOG_DATA_INIT;
|
static struct syslog_data sdata = SYSLOG_DATA_INIT;
|
||||||
|
|
||||||
extern char *__progname; /* Program name, from crt0. */
|
extern const char *__progname; /* Program name, from crt0. */
|
||||||
|
|
||||||
static void disconnectlog_r(struct syslog_data *); /* disconnect from syslogd */
|
static void disconnectlog_r(struct syslog_data *); /* disconnect from syslogd */
|
||||||
static void connectlog_r(struct syslog_data *); /* (re)connect to syslogd */
|
static void connectlog_r(struct syslog_data *); /* (re)connect to syslogd */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user