diff options
Diffstat (limited to 'examples/loadables')
-rw-r--r-- | examples/loadables/Makefile.in | 9 | ||||
-rw-r--r-- | examples/loadables/basename.c | 18 | ||||
-rw-r--r-- | examples/loadables/finfo.c | 18 | ||||
-rw-r--r-- | examples/loadables/hello.c | 18 | ||||
-rw-r--r-- | examples/loadables/mkdir.c | 2 | ||||
-rw-r--r-- | examples/loadables/sleep.c | 4 |
6 files changed, 60 insertions, 9 deletions
diff --git a/examples/loadables/Makefile.in b/examples/loadables/Makefile.in index 343beb0..99549bf 100644 --- a/examples/loadables/Makefile.in +++ b/examples/loadables/Makefile.in @@ -85,7 +85,7 @@ INC = -I. -I.. -I$(topdir) -I$(topdir)/lib -I$(topdir)/builtins \ ALLPROG = print truefalse sleep pushd finfo logname basename dirname \ tty pathchk tee head mkdir rmdir printenv id whoami \ - uname sync push ln unlink cut realpath getconf strftime mypid + uname sync push ln unlink realpath strftime mypid OTHERPROG = necho hello cat all: $(SHOBJ_STATUS) @@ -110,9 +110,6 @@ print: print.o necho: necho.o $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ necho.o $(SHOBJ_LIBS) -getconf: getconf.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ getconf.o $(SHOBJ_LIBS) - hello: hello.o $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ hello.o $(SHOBJ_LIBS) @@ -179,9 +176,6 @@ ln: ln.o unlink: unlink.o $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ unlink.o $(SHOBJ_LIBS) -cut: cut.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ cut.o $(SHOBJ_LIBS) - realpath: realpath.o $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ realpath.o $(SHOBJ_LIBS) @@ -229,7 +223,6 @@ tee.o: tee.c head.o: head.c rmdir.o: rmdir.c necho.o: necho.c -getconf.o: getconf.c hello.o: hello.c cat.o: cat.c printenv.o: printenv.c diff --git a/examples/loadables/basename.c b/examples/loadables/basename.c index b5705cb..7ee817f 100644 --- a/examples/loadables/basename.c +++ b/examples/loadables/basename.c @@ -2,6 +2,24 @@ /* See Makefile for compilation details. */ +/* + Copyright (C) 1999-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Bash is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Bash. If not, see <http://www.gnu.org/licenses/>. +*/ + #include "config.h" #if defined (HAVE_UNISTD_H) diff --git a/examples/loadables/finfo.c b/examples/loadables/finfo.c index af7ffb6..b806ef0 100644 --- a/examples/loadables/finfo.c +++ b/examples/loadables/finfo.c @@ -5,6 +5,24 @@ * chet@po.cwru.edu */ +/* + Copyright (C) 1999-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Bash is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Bash. If not, see <http://www.gnu.org/licenses/>. +*/ + #ifdef HAVE_CONFIG_H # include <config.h> #endif diff --git a/examples/loadables/hello.c b/examples/loadables/hello.c index bff6e76..643156c 100644 --- a/examples/loadables/hello.c +++ b/examples/loadables/hello.c @@ -3,6 +3,24 @@ /* See Makefile for compilation details. */ +/* + Copyright (C) 1999-2009 Free Software Foundation, Inc. + + This file is part of GNU Bash. + Bash is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Bash is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Bash. If not, see <http://www.gnu.org/licenses/>. +*/ + #include <config.h> #if defined (HAVE_UNISTD_H) diff --git a/examples/loadables/mkdir.c b/examples/loadables/mkdir.c index f41f171..f5c105e 100644 --- a/examples/loadables/mkdir.c +++ b/examples/loadables/mkdir.c @@ -109,7 +109,7 @@ mkdir_builtin (list) umask (original_umask); nmode = (S_IRWXU | S_IRWXG | S_IRWXO) & ~original_umask; - parent_mode = nmode | (S_IWRITE|S_IEXEC); /* u+wx */ + parent_mode = nmode | (S_IWUSR|S_IXUSR); /* u+wx */ /* Adjust new mode based on mode argument */ nmode &= omode; diff --git a/examples/loadables/sleep.c b/examples/loadables/sleep.c index a9bd36f..736c8af 100644 --- a/examples/loadables/sleep.c +++ b/examples/loadables/sleep.c @@ -66,6 +66,10 @@ WORD_LIST *list; return(EX_USAGE); } + /* Skip over `--' */ + if (list->word && ISOPTION (list->word->word, '-')) + list = list->next; + if (*list->word->word == '-' || list->next) { builtin_usage (); return (EX_USAGE); |