* Rules (static-only-routines rule): Remove spurious space in dep.
* misc/getusershell.c: Undo changes of 7 May 96 (rev 1.6).
Cast string constants to char *.
* posix/glob/SMakefile, posix/glob/SCOPTIONS, posix/glob/Makefile.ami:
New files, AmigaDOS support from Aaron Digulla.
* posix/Makefile (glob.tar): Add AmigaDOS support files.
Thu May 9 09:17:46 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
+ * Makerules (versioned): Strip whitespace.
+
+ * Rules (static-only-routines rule): Remove spurious space in dep.
+
+ * misc/getusershell.c: Undo changes of 7 May 96 (rev 1.6).
+ Cast string constants to char *.
+
+ * posix/glob/SMakefile, posix/glob/SCOPTIONS, posix/glob/Makefile.ami:
+ New files, AmigaDOS support from Aaron Digulla.
+ * posix/Makefile (glob.tar): Add AmigaDOS support files.
+
* sysdeps/unix/sysv/linux/net/if.h: New file.
* sysdeps/unix/sysv/linux/Dist: Add it.
* sysdeps/unix/sysv/linux/Makefile [$(subdir)=socket] (headers): Add
install-lib-nosubdir: $(install-lib.so:%=$(libdir)/%)
# Find which .so's have versions.
-versioned := $(foreach so,$(install-lib.so),\
- $(patsubst %,$(so),$($(so)-version)))
+versioned := $(strip $(foreach so,$(install-lib.so),\
+ $(patsubst %,$(so),$($(so)-version))))
# Install all the unversioned shared libraries.
$(addprefix $(libdir)/,$(filter-out $(versioned),$(install-lib.so))): \
ifdef static-only-routines
# These routines are to be omitted from the shared library object,
# so we replace the PIC objects for them with the empty object file.
-$(static-only-routines:%=$(objpfx)%.so): %.so: $(common-objpfx) empty.o
+$(static-only-routines:%=$(objpfx)%.so): %.so: $(objpfx)empty.o
rm -f $@
ln $< $@
endif
* /etc/shells.
*/
-static const char *okshells[] = { _PATH_BSHELL, _PATH_CSHELL, NULL };
-static const char **curshell, **shells, *strings;
-static const char **initshells __P((void));
+static char *okshells[] = { (char *) _PATH_BSHELL, (char *) _PATH_CSHELL,
+ NULL };
+static char **curshell, **shells, *strings;
+static char **initshells __P((void));
/*
* Get a list of shells from _PATH_SHELLS, if it exists.
char *
getusershell()
{
- const char *ret;
+ char *ret;
if (curshell == NULL)
curshell = initshells();
ret = *curshell;
if (ret != NULL)
curshell++;
- return (char *) ret; /* Cast away `const' for history reasons. */
+ return (ret);
}
void
endusershell()
{
-
+
if (shells != NULL)
free(shells);
shells = NULL;
curshell = initshells();
}
-static const char **
+static char **
initshells()
{
register char **sp, *cp;
struct stat statb;
if (shells != NULL)
- free((char *) shells);
+ free(shells);
shells = NULL;
if (strings != NULL)
- free((char *) strings);
+ free(strings);
strings = NULL;
if ((fp = fopen(_PATH_SHELLS, "r")) == NULL)
return (okshells);
strings = NULL;
return (okshells);
}
- sp = (char *) shells;
- cp = (char *) strings;
+ sp = shells;
+ cp = strings;
while (fgets(cp, statb.st_size - (cp - strings), fp) != NULL) {
while (*cp != '#' && *cp != '/' && *cp != '\0')
cp++;