* (*): Change some "char *" -> "const char *" declarations for
warning suppression on gcc 4.3.
+2008-11-07 Frank Ch. Eigler <fche@redhat.com>
+
+ * (*): Change some "char *" -> "const char *" declarations for
+ warning suppression on gcc 4.3.
+
2006-10-18 Dave Brolley <brolley@redhat.com>
* Contribute the following changes:
2006-10-18 Dave Brolley <brolley@redhat.com>
* Contribute the following changes:
#define MAX_LOGLEV 4
typedef class logfunctions {
#define MAX_LOGLEV 4
typedef class logfunctions {
int type;
// values of onoff: 0=ignore, 1=report, 2=fatal
#define ACT_IGNORE 0
int type;
// values of onoff: 0=ignore, 1=report, 2=fatal
#define ACT_IGNORE 0
logfunctions(class iofunctions *);
~logfunctions(void);
logfunctions(class iofunctions *);
~logfunctions(void);
- void info(char *fmt, ...);
- void error(char *fmt, ...);
- void panic(char *fmt, ...);
- void ldebug(char *fmt, ...);
- void fatal (char *prefix, char *fmt, va_list ap);
- void setprefix(char *);
+ void info(const char *fmt, ...);
+ void error(const char *fmt, ...);
+ void panic(const char *fmt, ...);
+ void ldebug(const char *fmt, ...);
+ void fatal (const char *prefix, const char *fmt, va_list ap);
+ void setprefix(const char *);
void settype(int);
void setio(class iofunctions *);
void setonoff(int loglev, int value) { onoff[loglev] = value; }
void settype(int);
void setio(class iofunctions *);
void setonoff(int loglev, int value) { onoff[loglev] = value; }
class logfunctions *log;
void init(void);
void flush(void);
class logfunctions *log;
void init(void);
void flush(void);
- char *getlevel(int i) {
- static char *loglevel[] = {
+ const char *getlevel(int i) {
+ static const char *loglevel[] = {
"DEBUG",
"INFO",
"ERROR",
"DEBUG",
"INFO",
"ERROR",
- char *getclass(int i) {
- char *logclass[] = {
+ const char *getclass(int i) {
+ static const char *logclass[] = {
iofunctions(char *);
~iofunctions(void);
iofunctions(char *);
~iofunctions(void);
- void out(int facility, int level, char *pre, char *fmt, va_list ap);
+ void out(int facility, int level, const char *pre, const char *fmt, va_list ap);
void init_log(char *fn);
void init_log(int fd);
void init_log(char *fn);
void init_log(int fd);
int n_logfn;
#define MAX_LOGFNS 64
logfunc_t *logfn_list[MAX_LOGFNS];
int n_logfn;
#define MAX_LOGFNS 64
logfunc_t *logfn_list[MAX_LOGFNS];
};
typedef class iofunctions iofunc_t;
};
typedef class iofunctions iofunc_t;
void bx_init_debug(void);
void bx_emulate_hga_dumps_timer(void);
void bx_init_debug(void);
void bx_emulate_hga_dumps_timer(void);
-static char *divider = "========================================================================";
+static const char *divider = "========================================================================";
// use newfd/newfn so that we can log the message to the OLD log
// file descriptor.
FILE *newfd = stderr;
// use newfd/newfn so that we can log the message to the OLD log
// file descriptor.
FILE *newfd = stderr;
- char *newfn = "/dev/stderr";
+ const char *newfn = "/dev/stderr";
if( strcmp( fn, "-" ) != 0 ) {
newfd = fopen(fn, "w");
if(newfd != NULL) {
if( strcmp( fn, "-" ) != 0 ) {
newfd = fopen(fn, "w");
if(newfd != NULL) {
// fmt and ap retained for direct printinf from iofunctions only!
void
// fmt and ap retained for direct printinf from iofunctions only!
void
-iofunctions::out(int f, int l, char *prefix, char *fmt, va_list ap)
+iofunctions::out(int f, int l, const char *prefix, const char *fmt, va_list ap)
{
assert (magic==MAGIC_LOGNUM);
assert (this != NULL);
{
assert (magic==MAGIC_LOGNUM);
assert (this != NULL);
-logfunctions::setprefix(char *p)
+logfunctions::setprefix(const char *p)
{
this->prefix=strdup(p);
}
{
this->prefix=strdup(p);
}
-logfunctions::info(char *fmt, ...)
+logfunctions::info(const char *fmt, ...)
-logfunctions::error(char *fmt, ...)
+logfunctions::error(const char *fmt, ...)
-logfunctions::panic(char *fmt, ...)
+logfunctions::panic(const char *fmt, ...)
-logfunctions::ldebug(char *fmt, ...)
+logfunctions::ldebug(const char *fmt, ...)
-logfunctions::fatal (char *prefix, char *fmt, va_list ap)
+logfunctions::fatal (const char *prefix, const char *fmt, va_list ap)
{
static int fatal_reentry = 0;
if (fatal_reentry) return;
{
static int fatal_reentry = 0;
if (fatal_reentry) return;
typedef int exp_t;
typedef sid::host_int_8 fraction_t;
typedef int exp_t;
typedef sid::host_int_8 fraction_t;
- typedef enum round_mode_t
{
round_default,
round_near,
{
round_default,
round_near,
{
denorm_default,
denorm_underflow_inexact,
denorm_zero
};
{
denorm_default,
denorm_underflow_inexact,
denorm_zero
};
{
class_zero,
class_snan,
{
class_zero,
class_snan,
{
std::vector<std::string> search_directories;
{
std::vector<std::string> search_directories;
- char* slp = getenv ("SID_LIBRARY_PATH"); // run-time configuration
+ const char* slp = getenv ("SID_LIBRARY_PATH"); // run-time configuration
if (slp)
{
search_directories = tokenize (slp, ":");
}
if (slp)
{
search_directories = tokenize (slp, ":");
}
- char* sep = getenv ("SID_EXEC_PREFIX"); // install-time configuration
+ const char* sep = getenv ("SID_EXEC_PREFIX"); // install-time configuration
#ifdef __CYGWIN__
char conv_fn[PATH_MAX*2];
if (sep)
#ifdef __CYGWIN__
char conv_fn[PATH_MAX*2];
if (sep)