Warning fixes.
This commit is contained in:
parent
ce249649b2
commit
13e195d19f
|
@ -5,9 +5,9 @@
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
#if defined(_POSIX_SOURCE)
|
#if defined(_POSIX_SOURCE)
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
raise(int sig)
|
raise(int sig)
|
||||||
|
|
|
@ -5,10 +5,12 @@
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
#if defined(_POSIX_SOURCE)
|
#if defined(_POSIX_SOURCE)
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
|
extern char** environ;
|
||||||
|
|
||||||
extern int _fork(void);
|
extern int _fork(void);
|
||||||
extern int _wait(int *);
|
extern int _wait(int *);
|
||||||
|
@ -18,7 +20,6 @@ extern void _close(int);
|
||||||
|
|
||||||
#define FAIL 127
|
#define FAIL 127
|
||||||
|
|
||||||
extern const char **environ;
|
|
||||||
static const char *exec_tab[] = {
|
static const char *exec_tab[] = {
|
||||||
"sh", /* argv[0] */
|
"sh", /* argv[0] */
|
||||||
"-c", /* argument to the shell */
|
"-c", /* argument to the shell */
|
||||||
|
@ -39,7 +40,7 @@ system(const char *str)
|
||||||
_close(i);
|
_close(i);
|
||||||
if (!str) str = "cd ."; /* just testing for a shell */
|
if (!str) str = "cd ."; /* just testing for a shell */
|
||||||
exec_tab[2] = str; /* fill in command */
|
exec_tab[2] = str; /* fill in command */
|
||||||
_execve("/bin/sh", exec_tab, environ);
|
_execve("/bin/sh", exec_tab, (char const**) environ);
|
||||||
/* get here if execve fails ... */
|
/* get here if execve fails ... */
|
||||||
_exit(FAIL); /* see manual page */
|
_exit(FAIL); /* see manual page */
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,8 @@
|
||||||
*/
|
*/
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
#include <string.h>
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
char*
|
char*
|
||||||
strdup(const char *s)
|
strdup(const char *s)
|
||||||
|
|
|
@ -89,6 +89,7 @@ typedef int sig_atomic_t;
|
||||||
typedef void (*sighandler_t)(int);
|
typedef void (*sighandler_t)(int);
|
||||||
extern sighandler_t signal(int signum, sighandler_t handler);
|
extern sighandler_t signal(int signum, sighandler_t handler);
|
||||||
extern int raise(int signum);
|
extern int raise(int signum);
|
||||||
|
extern int kill(pid_t pid, int sig);
|
||||||
|
|
||||||
/* Select */
|
/* Select */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue