am 59e9a496
: Merge "__progname should be const char*, not char*."
# Via Elliott Hughes (1) and Gerrit Code Review (1) * commit '59e9a496b4341fd2b11d4a01544bf7edf3d00cc5': __progname should be const char*, not char*.
This commit is contained in:
commit
8ddef40dad
5 changed files with 6 additions and 6 deletions
|
@ -34,7 +34,7 @@
|
|||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
|
||||
extern char *__progname;
|
||||
extern const char* __progname;
|
||||
|
||||
__noreturn void
|
||||
err(int eval, const char *fmt, ...)
|
||||
|
|
|
@ -46,7 +46,7 @@ extern "C" unsigned __get_sp(void);
|
|||
extern "C" int __system_properties_init(void);
|
||||
|
||||
// Not public, but well-known in the BSDs.
|
||||
char* __progname;
|
||||
const char* __progname;
|
||||
|
||||
// Declared in <unistd.h>
|
||||
char** environ;
|
||||
|
@ -88,7 +88,7 @@ void __libc_init_common(KernelArgumentBlock& args) {
|
|||
environ = args.envp;
|
||||
errno = 0;
|
||||
__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.
|
||||
pthread_internal_t* main_thread = __get_thread();
|
||||
|
|
|
@ -256,7 +256,7 @@ static MallocDebug gMallocUse __attribute__((aligned(32))) = {
|
|||
dlmalloc, dlfree, dlcalloc, dlrealloc, dlmemalign
|
||||
};
|
||||
|
||||
extern char* __progname;
|
||||
extern const char* __progname;
|
||||
|
||||
/* Handle to shared library where actual memory allocation is implemented.
|
||||
* 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 =
|
||||
"===============================================================";
|
||||
|
||||
extern char* __progname;
|
||||
extern const char* __progname;
|
||||
|
||||
#define STACK_TRACE_DEPTH 16
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
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 connectlog_r(struct syslog_data *); /* (re)connect to syslogd */
|
||||
|
|
Loading…
Reference in a new issue