diff options
Diffstat (limited to 'winsup/testsuite/libltp')
-rw-r--r-- | winsup/testsuite/libltp/include/search_path.h | 2 | ||||
-rw-r--r-- | winsup/testsuite/libltp/include/test.h | 21 | ||||
-rw-r--r-- | winsup/testsuite/libltp/include/usctest.h | 2 | ||||
-rw-r--r-- | winsup/testsuite/libltp/lib/libtestsuite.c | 4 | ||||
-rw-r--r-- | winsup/testsuite/libltp/lib/parse_opts.c | 2 | ||||
-rw-r--r-- | winsup/testsuite/libltp/lib/search_path.c | 2 | ||||
-rw-r--r-- | winsup/testsuite/libltp/lib/tst_res.c | 14 | ||||
-rw-r--r-- | winsup/testsuite/libltp/lib/tst_tmpdir.c | 4 |
8 files changed, 27 insertions, 24 deletions
diff --git a/winsup/testsuite/libltp/include/search_path.h b/winsup/testsuite/libltp/include/search_path.h index 131311b44..58b7a36d2 100644 --- a/winsup/testsuite/libltp/include/search_path.h +++ b/winsup/testsuite/libltp/include/search_path.h @@ -33,4 +33,4 @@ /* $Id$ */ -int search_path(char *cmd, char *res_path, int access_mode, int fullpath); +int search_path(const char *cmd, const char *res_path, int access_mode, int fullpath); diff --git a/winsup/testsuite/libltp/include/test.h b/winsup/testsuite/libltp/include/test.h index c4978dc4d..9bad911c4 100644 --- a/winsup/testsuite/libltp/include/test.h +++ b/winsup/testsuite/libltp/include/test.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. - * + *. * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. @@ -35,9 +35,26 @@ #ifndef __TEST_H__ #define __TEST_H__ +#define execve execve_foo +#define execv execv_foo +#define execvp execvp_foo #include <stdio.h> #include <signal.h> #include <unistd.h> +#include <stdlib.h> +#include <string.h> +#undef execvp +#undef execv +#undef execve + +int execve(const char *, const char * const [], char * const *); +int execv(const char *, const char * const []); +int execvp(const char *, const char * const []); + +/* CGF: Avoid compilation warnings for undefined functions */ +extern int setregid (gid_t, gid_t); +int setreuid (uid_t, uid_t); +int gethostid (void); #define TPASS 0 /* Test passed flag */ #define TFAIL 1 /* Test failed flag */ @@ -190,7 +207,7 @@ extern void tst_clear_error(); * The following prototypes are needed to remove compile errors * on IRIX systems when compiled with -n32 and -64. */ -extern void tst_res(int ttype, char *fname, const char *arg_fmt, ...); +extern void tst_res(int ttype, const char *fname, const char *arg_fmt, ...); extern void tst_resm(int ttype, const char *arg_fmt, ...); extern void tst_brk(int ttype, char *fname, void (*func)(), const char *arg_fmt, ...); diff --git a/winsup/testsuite/libltp/include/usctest.h b/winsup/testsuite/libltp/include/usctest.h index 232e67a98..ef2d032d7 100644 --- a/winsup/testsuite/libltp/include/usctest.h +++ b/winsup/testsuite/libltp/include/usctest.h @@ -115,7 +115,7 @@ * to indicate valid options and return option arguments ***********************************************************************/ typedef struct { - char *option; /* Valid option string (one option only) like "a:" */ + const char *option; /* Valid option string (one option only) like "a:" */ int *flag; /* pointer to location to set true if option given */ char **arg; /* pointer to location to place argument, if needed */ } option_t; diff --git a/winsup/testsuite/libltp/lib/libtestsuite.c b/winsup/testsuite/libltp/lib/libtestsuite.c index e974c871e..e741d25f6 100644 --- a/winsup/testsuite/libltp/lib/libtestsuite.c +++ b/winsup/testsuite/libltp/lib/libtestsuite.c @@ -29,10 +29,6 @@ * my_getpwnam(), do_file_setup() * */ -#include <unistd.h> -#include <stdlib.h> -#include <string.h> -#include <stdio.h> #include <pwd.h> #include <errno.h> #include <fcntl.h> diff --git a/winsup/testsuite/libltp/lib/parse_opts.c b/winsup/testsuite/libltp/lib/parse_opts.c index c40181395..e4da236e6 100644 --- a/winsup/testsuite/libltp/lib/parse_opts.c +++ b/winsup/testsuite/libltp/lib/parse_opts.c @@ -69,12 +69,10 @@ * *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/ #include <errno.h> -#include <stdlib.h> #include <string.h> #include <sys/param.h> #include <sys/signal.h> #include <sys/types.h> -#include <unistd.h> #include <sys/time.h> #ifdef __CYGWIN__ diff --git a/winsup/testsuite/libltp/lib/search_path.c b/winsup/testsuite/libltp/lib/search_path.c index 6663da507..775c7b1a6 100644 --- a/winsup/testsuite/libltp/lib/search_path.c +++ b/winsup/testsuite/libltp/lib/search_path.c @@ -101,7 +101,7 @@ char **argv; */ int search_path(cmd, res_path, access_mode, fullpath) -char *cmd; /* The requested filename */ +const char *cmd; /* The requested filename */ char *res_path; /* The resulting path or error mesg */ int access_mode; /* the mode used by access(2) */ int fullpath; /* if set, cwd will be prepended to all non-full paths */ diff --git a/winsup/testsuite/libltp/lib/tst_res.c b/winsup/testsuite/libltp/lib/tst_res.c index 7f0a003f3..99767ec9b 100644 --- a/winsup/testsuite/libltp/lib/tst_res.c +++ b/winsup/testsuite/libltp/lib/tst_res.c @@ -106,11 +106,7 @@ * *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/ #include <errno.h> -#include <string.h> -#include <stdio.h> /* for I/O functions, BUFSIZ */ -#include <stdlib.h> /* for getenv() */ #include <stdarg.h> /* for varargs stuff */ -#include <unistd.h> /* for access() */ #include "test.h" /* for output display mode & result type */ /* defines */ @@ -154,14 +150,14 @@ static void check_env(); static void tst_condense(int tnum, int ttype, char *tmesg); static void tst_print(char *tcid, int tnum, int trange, int ttype, const char *tmesg); -static void cat_file(char *filename); +static void cat_file(const char *filename); /* * Define some static/global variables. */ static FILE *T_out = NULL; /* tst_res() output file descriptor */ -static char *File; /* file whose contents is part of result */ +static const char *File; /* file whose contents is part of result */ static int T_exitval = 0; /* exit value used by tst_exit() */ static int T_mode = VERBOSE; /* flag indicating print mode: VERBOSE, */ /* CONDENSE, NOPASS, DISCARD */ @@ -216,7 +212,7 @@ char *TESTDIR = NULL; * eventually get here to print the results. */ void -tst_res(int ttype, char *fname, const char *arg_fmt, ...) +tst_res(int ttype, const char *fname, const char *arg_fmt, ...) { int i; char tmesg[USERMESG]; /* expanded message */ @@ -329,7 +325,7 @@ tst_res(int ttype, char *fname, const char *arg_fmt, ...) static void tst_condense(int tnum, int ttype, char *tmesg) { - char *file; + const char *file; #if DEBUG printf("IN tst_condense: tcid = %s, tnum = %d, ttype = %d, tmesg = %s\n", @@ -802,7 +798,7 @@ tst_brkloopm(int ttype, void (*func)(), const char *arg_fmt, ...) * cat_file() - Print the contents of a file to standard out. */ static void -cat_file(char *filename) +cat_file(const char *filename) { FILE *fp; /* file pointer */ int b_read; /* number of bytes read with read() */ diff --git a/winsup/testsuite/libltp/lib/tst_tmpdir.c b/winsup/testsuite/libltp/lib/tst_tmpdir.c index ef1e2cd70..cd9d9c8b8 100644 --- a/winsup/testsuite/libltp/lib/tst_tmpdir.c +++ b/winsup/testsuite/libltp/lib/tst_tmpdir.c @@ -63,11 +63,7 @@ * Neither tst_tmpdir() or tst_rmdir() has a return value. * *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/ -#include <stdio.h> #include <errno.h> -#include <stdlib.h> /* for getenv() */ -#include <string.h> /* for string functions */ -#include <unistd.h> /* for sysconf(), getcwd(), rmdir() */ #include <sys/types.h> /* for mkdir() */ #include <sys/stat.h> /* for mkdir() */ #include "test.h" |