This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMU Common Lisp".
The branch, master has been updated via 771b7ee43d15c24563557b102ec15f466ece13cb (commit) from f1874509af0afa2aedd12e9cc61654e0bc0a4519 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 771b7ee43d15c24563557b102ec15f466ece13cb Author: Raymond Toy toy.raymond@gmail.com Date: Fri Dec 23 08:18:28 2011 -0800
Fix more compiler warnings.
Linux-os.c: o Fix warning about pointer to int warning.
lisp.c: o Linux needs time.h to define tzset. o Fix warning about unused result from getwcd. If getcwd fails, we now just exit with a message because we can't find anything.
diff --git a/src/lisp/Linux-os.c b/src/lisp/Linux-os.c index f4b96ef..20731e2 100644 --- a/src/lisp/Linux-os.c +++ b/src/lisp/Linux-os.c @@ -65,7 +65,7 @@ int personality (unsigned long); #endif
void -check_personality(struct utsname *name, const char *argv[], const char *envp[]) +check_personality(struct utsname *name, char *const *argv, char *const *envp) { /* KLUDGE: Disable memory randomization on new Linux kernels * by setting a personality flag and re-executing. (We need @@ -428,7 +428,7 @@ sigsegv_handler(HANDLER_ARGS) tramp_signal = signal; tramp_code = *code; tramp_context = *context; - SC_PC(context) = sigsegv_handler_tramp; + SC_PC(context) = (unsigned long) sigsegv_handler_tramp; return; } #endif diff --git a/src/lisp/lisp.c b/src/lisp/lisp.c index d719c8d..2eb000f 100644 --- a/src/lisp/lisp.c +++ b/src/lisp/lisp.c @@ -40,6 +40,10 @@ #include <sys/utsname.h> #endif
+#if defined(__linux__) +#include <time.h> +#endif +
/* SIGINT handler that invokes the monitor. */ @@ -94,6 +98,16 @@ static char *cmucllib_search_list[] = { NULL };
+void +getcwd_or_die(char* buf, size_t size) +{ + char *result = getcwd(buf, size); + + if (result == NULL) { + perror("Cannot get cwd"); + exit(1); + } +}
/* Set this to see how we're doing our search */ int debug_lisp_search = FALSE; @@ -154,7 +168,7 @@ default_cmucllib(const char *argv0arg) * append argv[0], after stripping off the executable name. */ cwd = malloc(FILENAME_MAX + strlen(argv0_dir) + 100); - getcwd(cwd, FILENAME_MAX); + getcwd_or_die(cwd, FILENAME_MAX); strcat(cwd, "/"); if (*argv0_dir != '\0') { strcat(cwd, argv0_dir); @@ -353,7 +367,7 @@ prepend_core_path(const char *lib, const char *corefile) * We have a relative path for the corefile. Prepend our current * directory to get the full path. */ - getcwd(cwd, FILENAME_MAX); + getcwd_or_die(cwd, FILENAME_MAX); path = malloc(FILENAME_MAX + strlen(corefile) + 2); strcpy(path, cwd); strcat(path, "/");
-----------------------------------------------------------------------
Summary of changes: src/lisp/Linux-os.c | 4 ++-- src/lisp/lisp.c | 18 ++++++++++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-)
hooks/post-receive