mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
- Added the "execvp_test" program.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15117 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
#
|
||||
# $Id: GNUmakefile.68k,v 1.12 2006-04-18 08:29:46 obarthel Exp $
|
||||
# $Id: GNUmakefile.68k,v 1.13 2006-08-02 09:22:38 obarthel Exp $
|
||||
#
|
||||
# :ts=8
|
||||
#
|
||||
@ -49,13 +49,13 @@ LIBS = -lm -lc -lgcc
|
||||
all: test fgets_test iotest sscanf_test printf_test sprintf_test \
|
||||
stack_size_test translate_test strtok_test uname simple \
|
||||
fstat_stdout_test simple_sprintf date_test sscanf_64 factorial \
|
||||
setlocale rand
|
||||
execvp_test setlocale rand
|
||||
|
||||
clean:
|
||||
$(DELETE) #?.o #?.map test fgets_test iotest sscanf_test printf_test \
|
||||
sprintf_test stack_size_test translate_test strtok_test uname \
|
||||
simple fstat_stdout_test simple_sprintf date_test sscanf_64 \
|
||||
factorial setlocale rand
|
||||
factorial execvp_test setlocale rand
|
||||
|
||||
##############################################################################
|
||||
|
||||
@ -127,6 +127,10 @@ factorial : factorial.o
|
||||
@echo "Linking $@"
|
||||
$(CC) $(CFLAGS) -o $@ factorial.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
|
||||
|
||||
execvp_test : execvp_test.o
|
||||
@echo "Linking $@"
|
||||
$(CC) $(CFLAGS) -o $@ execvp_test.o -lunix $(LIBS) -Wl,--cref,-M,-Map=$@.map
|
||||
|
||||
rand : rand.o
|
||||
@echo "Linking $@"
|
||||
$(CC) $(CFLAGS) -o $@ rand.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
|
||||
|
||||
16
test_programs/execvp_test.c
Normal file
16
test_programs/execvp_test.c
Normal file
@ -0,0 +1,16 @@
|
||||
/*
|
||||
* $Id: execvp_test.c,v 1.1 2006-08-02 09:22:38 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
int
|
||||
main(int argc,char ** argv)
|
||||
{
|
||||
if(argc > 1)
|
||||
execvp(argv[1],&argv[2]);
|
||||
|
||||
return(0);
|
||||
}
|
||||
Reference in New Issue
Block a user