Mercurial > hg > octave-kai > gnulib-hg
diff lib/getusershell.c @ 2966:8d2c63fa3a16
(setusershell): Use rewind rather than
fseek/fseeko, to avoid configuration hassles with fseeko.
Don't bother opening SHELLS_FILE if shellstream is NULL;
it's not necessary.
author | Jim Meyering <jim@meyering.net> |
---|---|
date | Tue, 07 Nov 2000 15:35:15 +0000 |
parents | 7ae462ff7f49 |
children | 5d2b5bde7c6f |
line wrap: on
line diff
--- a/lib/getusershell.c +++ b/lib/getusershell.c @@ -100,16 +100,8 @@ setusershell () { default_index = 0; - if (shellstream == NULL) - shellstream = fopen (SHELLS_FILE, "r"); - else - { -#ifdef HAVE_FSEEKO - fseeko (shellstream, 0, 0); -#else - fseek (shellstream, 0L, 0); -#endif - } + if (shellstream) + rewind (shellstream); } /* Close the shells file. */