Skip to content
Snippets Groups Projects
Commit 0ac2c885 authored by rtoy's avatar rtoy
Browse files

Fix more compiler warnings:

* backtrace.c, save.c:  fprintf warnings.
* interrupt.h: Declare build_fake_control_stack_frame and
  interrupt_handle_space_overflow.
* os-common.c: Include interrupt.h to define
  build_fake_control_stack_frame.
* parse.c, runprog.c, search.c:  Include some standard system headers
  to get rid of undefined function warnings.
parent 5a1bf534
No related branches found
No related tags found
No related merge requests found
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/backtrace.c,v 1.9 2004/05/18 22:41:23 cwang Exp $ /* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/backtrace.c,v 1.10 2004/07/07 22:22:59 rtoy Exp $
* *
* Simple backtrace facility. More or less from Rob's lisp version. * Simple backtrace facility. More or less from Rob's lisp version.
*/ */
...@@ -134,7 +134,7 @@ previous_info(struct call_info *info) ...@@ -134,7 +134,7 @@ previous_info(struct call_info *info)
struct sigcontext *csp; struct sigcontext *csp;
if (!cs_valid_pointer_p(info->frame)) { if (!cs_valid_pointer_p(info->frame)) {
printf("Bogus callee value (0x%08x).\n", (unsigned long)info->frame); printf("Bogus callee value (0x%08lx).\n", (unsigned long)info->frame);
return 0; return 0;
} }
...@@ -182,13 +182,13 @@ backtrace(int nframes) ...@@ -182,13 +182,13 @@ backtrace(int nframes)
info_from_lisp_state(&info); info_from_lisp_state(&info);
do { do {
printf("<Frame 0x%08x%s, ", (unsigned long) info.frame, printf("<Frame 0x%08lx%s, ", (unsigned long) info.frame,
info.interrupted ? " [interrupted]" : ""); info.interrupted ? " [interrupted]" : "");
if (info.code != (struct code *) 0) { if (info.code != (struct code *) 0) {
lispobj function; lispobj function;
printf("CODE: 0x%08X, ", (unsigned long) info.code | type_OtherPointer); printf("CODE: 0x%08lX, ", (unsigned long) info.code | type_OtherPointer);
#ifndef alpha #ifndef alpha
function = info.code->entry_points; function = info.code->entry_points;
...@@ -231,7 +231,7 @@ backtrace(int nframes) ...@@ -231,7 +231,7 @@ backtrace(int nframes)
printf("CODE: ???, "); printf("CODE: ???, ");
if (info.lra != NIL) if (info.lra != NIL)
printf("LRA: 0x%08x, ", (unsigned long)info.lra); printf("LRA: 0x%08lx, ", (unsigned long)info.lra);
else else
printf("<no LRA>, "); printf("<no LRA>, ");
......
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/interrupt.h,v 1.7 2004/07/07 15:03:12 rtoy Exp $ */ /* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/interrupt.h,v 1.8 2004/07/07 22:22:59 rtoy Exp $ */
#if !defined(_INCLUDE_INTERRUPT_H_) #if !defined(_INCLUDE_INTERRUPT_H_)
#define _INCLUDE_INTERRUPT_H_ #define _INCLUDE_INTERRUPT_H_
...@@ -27,6 +27,9 @@ extern void interrupt_install_low_level_handler ...@@ -27,6 +27,9 @@ extern void interrupt_install_low_level_handler
extern unsigned long install_handler(int signal, extern unsigned long install_handler(int signal,
void handler(HANDLER_ARGS)); void handler(HANDLER_ARGS));
extern void build_fake_control_stack_frame(os_context_t* context);
extern void interrupt_handle_space_overflow(lispobj error, os_context_t *context);
extern union interrupt_handler interrupt_handlers[NSIG]; extern union interrupt_handler interrupt_handlers[NSIG];
#ifdef hpux #ifdef hpux
......
/* /*
$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/os-common.c,v 1.15 2004/07/07 20:31:06 rtoy Exp $ $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/os-common.c,v 1.16 2004/07/07 22:22:59 rtoy Exp $
This code was written as part of the CMU Common Lisp project at This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University, and has been placed in the public domain. Carnegie Mellon University, and has been placed in the public domain.
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include "globals.h" #include "globals.h"
#include "interr.h" #include "interr.h"
#include "arch.h" #include "arch.h"
#include "interrupt.h"
/* Except for os_zero, these routines are only called by Lisp code. These /* Except for os_zero, these routines are only called by Lisp code. These
routines may also be replaced by os-dependent versions instead. See routines may also be replaced by os-dependent versions instead. See
......
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/parse.c,v 1.5 2004/05/19 23:33:44 cwang Exp $ */ /* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/parse.c,v 1.6 2004/07/07 22:22:59 rtoy Exp $ */
#include <stdio.h> #include <stdio.h>
#include <ctype.h> #include <ctype.h>
#include <signal.h> #include <signal.h>
#include <string.h>
#include <stdlib.h>
#include "lisp.h" #include "lisp.h"
#include "internals.h" #include "internals.h"
......
/* /*
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/runprog.c,v 1.3 2000/10/27 19:25:56 dtc Exp $ * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/runprog.c,v 1.4 2004/07/07 22:22:59 rtoy Exp $
* *
* Support for run-program. * Support for run-program.
* *
...@@ -11,6 +11,9 @@ ...@@ -11,6 +11,9 @@
#if defined(SVR4) || defined(__linux__) #if defined(SVR4) || defined(__linux__)
#include <unistd.h> #include <unistd.h>
#endif #endif
#if defined(SOLARIS)
#include <fcntl.h>
#endif
int spawn(char *program, char *argv[], char *envp[], char *pty_name, int spawn(char *program, char *argv[], char *envp[], char *pty_name,
int stdin, int stdout, int stderr) int stdin, int stdout, int stderr)
......
/* /*
$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/save.c,v 1.8 2003/08/22 13:20:03 toy Exp $ $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/save.c,v 1.9 2004/07/07 22:22:59 rtoy Exp $
This code was written as part of the CMU Common Lisp project at This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University, and has been placed in the public domain. Carnegie Mellon University, and has been placed in the public domain.
...@@ -67,7 +67,7 @@ static void output_space(FILE *file, int id, lispobj *addr, lispobj *end) ...@@ -67,7 +67,7 @@ static void output_space(FILE *file, int id, lispobj *addr, lispobj *end)
bytes = words * sizeof(lispobj); bytes = words * sizeof(lispobj);
printf("Writing %d bytes from the %s space at 0x%08X.\n", printf("Writing %d bytes from the %s space at 0x%08lX.\n",
bytes, names[id], (unsigned long)addr); bytes, names[id], (unsigned long)addr);
data = write_bytes(file, (char *)addr, bytes); data = write_bytes(file, (char *)addr, bytes);
......
/* /*
$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/search.c,v 1.2 1994/10/27 17:13:54 ram Exp $ $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/search.c,v 1.3 2004/07/07 22:22:59 rtoy Exp $
This code was written as part of the CMU Common Lisp project at This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University, and has been placed in the public domain. Carnegie Mellon University, and has been placed in the public domain.
*/ */
#include <string.h>
#include "lisp.h" #include "lisp.h"
#include "internals.h" #include "internals.h"
#include "os.h" #include "os.h"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment