mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 19:00:07 +00:00
Update.
1998-08-04 16:53 Ulrich Drepper <drepper@cygnus.com> * stdio-common/tmpfile.c: Include unistd.h for close prototype. * stdio-common/tmpfile64.c: Likewise. * db2/makedb.c: Generate output file with same access permissions the input file has. * signal/signal.h: Pretty printing. 1998-08-04 Andreas Jaeger <aj@arthur.rhein-neckar.de> * misc/mktemp.c: Add include <stlib.h> for prototype, remove unneccessary includes. * misc/mkstemp.c: Likewise.
This commit is contained in:
parent
d358336fe7
commit
9fbffc4676
16
ChangeLog
16
ChangeLog
@ -1,3 +1,19 @@
|
|||||||
|
1998-08-04 16:53 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
* stdio-common/tmpfile.c: Include unistd.h for close prototype.
|
||||||
|
* stdio-common/tmpfile64.c: Likewise.
|
||||||
|
|
||||||
|
* db2/makedb.c: Generate output file with same access permissions
|
||||||
|
the input file has.
|
||||||
|
|
||||||
|
* signal/signal.h: Pretty printing.
|
||||||
|
|
||||||
|
1998-08-04 Andreas Jaeger <aj@arthur.rhein-neckar.de>
|
||||||
|
|
||||||
|
* misc/mktemp.c: Add include <stlib.h> for prototype, remove
|
||||||
|
unneccessary includes.
|
||||||
|
* misc/mkstemp.c: Likewise.
|
||||||
|
|
||||||
1998-08-03 16:36 Ulrich Drepper <drepper@cygnus.com>
|
1998-08-03 16:36 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
* catgets/catgets.c: Use mmap/munmap only is _POSIX_MAPPED_FILES
|
* catgets/catgets.c: Use mmap/munmap only is _POSIX_MAPPED_FILES
|
||||||
|
11
db2/makedb.c
11
db2/makedb.c
@ -29,6 +29,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
|
||||||
/* Get libc version number. */
|
/* Get libc version number. */
|
||||||
#include "../version.h"
|
#include "../version.h"
|
||||||
@ -100,6 +101,7 @@ main (argc, argv)
|
|||||||
DB *db_file;
|
DB *db_file;
|
||||||
int status;
|
int status;
|
||||||
int remaining;
|
int remaining;
|
||||||
|
int mode = 0666;
|
||||||
|
|
||||||
/* Set locale via LC_ALL. */
|
/* Set locale via LC_ALL. */
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
@ -157,15 +159,22 @@ main (argc, argv)
|
|||||||
input_file = stdin;
|
input_file = stdin;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
struct stat st;
|
||||||
|
|
||||||
input_file = fopen (input_name, "r");
|
input_file = fopen (input_name, "r");
|
||||||
if (input_file == NULL)
|
if (input_file == NULL)
|
||||||
error (EXIT_FAILURE, errno, gettext ("cannot open input file `%s'"),
|
error (EXIT_FAILURE, errno, gettext ("cannot open input file `%s'"),
|
||||||
input_name);
|
input_name);
|
||||||
|
|
||||||
|
/* Get the access rights from the source file. The output file should
|
||||||
|
have the same. */
|
||||||
|
if (fstat (fileno (input_file), &st) >= 0)
|
||||||
|
mode = st.st_mode & ACCESSPERMS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Open output file. This must not be standard output so we don't
|
/* Open output file. This must not be standard output so we don't
|
||||||
handle "-" and "/dev/stdout" special. */
|
handle "-" and "/dev/stdout" special. */
|
||||||
db_file = dbopen (output_name, O_CREAT | O_RDWR | O_TRUNC, 0666,
|
db_file = dbopen (output_name, O_CREAT | O_RDWR | O_TRUNC, mode,
|
||||||
DB_BTREE, NULL);
|
DB_BTREE, NULL);
|
||||||
if (db_file == NULL)
|
if (db_file == NULL)
|
||||||
error (EXIT_FAILURE, errno, gettext ("cannot open output file `%s'"),
|
error (EXIT_FAILURE, errno, gettext ("cannot open output file `%s'"),
|
||||||
|
@ -16,9 +16,8 @@
|
|||||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
#include <errno.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
/* Generate a unique temporary file name from TEMPLATE.
|
/* Generate a unique temporary file name from TEMPLATE.
|
||||||
The last six characters of TEMPLATE must be "XXXXXX";
|
The last six characters of TEMPLATE must be "XXXXXX";
|
||||||
|
@ -16,9 +16,8 @@
|
|||||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
#include <errno.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
/* Generate a unique temporary file name from TEMPLATE.
|
/* Generate a unique temporary file name from TEMPLATE.
|
||||||
The last six characters of TEMPLATE must be "XXXXXX";
|
The last six characters of TEMPLATE must be "XXXXXX";
|
||||||
|
@ -170,12 +170,12 @@ typedef __sighandler_t sig_t;
|
|||||||
#endif /* <signal.h> included. */
|
#endif /* <signal.h> included. */
|
||||||
|
|
||||||
|
|
||||||
# if !defined __sigset_t_defined \
|
#if !defined __sigset_t_defined \
|
||||||
&& ((defined _SIGNAL_H && defined __USE_POSIX) || defined __need_sigset_t)
|
&& ((defined _SIGNAL_H && defined __USE_POSIX) || defined __need_sigset_t)
|
||||||
typedef __sigset_t sigset_t;
|
typedef __sigset_t sigset_t;
|
||||||
# define __sigset_t_defined 1
|
# define __sigset_t_defined 1
|
||||||
# endif /* `sigset_t' not defined and <signal.h> or need `sigset_t'. */
|
#endif /* `sigset_t' not defined and <signal.h> or need `sigset_t'. */
|
||||||
# undef __need_sigset_t
|
#undef __need_sigset_t
|
||||||
|
|
||||||
#ifdef __USE_POSIX
|
#ifdef __USE_POSIX
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#ifdef _USE_IN_LIBIO
|
#ifdef _USE_IN_LIBIO
|
||||||
# define fdopen _IO_new_fdopen
|
# define fdopen _IO_new_fdopen
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
#include <errno.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#ifdef _USE_IN_LIBIO
|
#ifdef _USE_IN_LIBIO
|
||||||
# define fdopen _IO_new_fdopen
|
# define fdopen _IO_new_fdopen
|
||||||
|
Loading…
Reference in New Issue
Block a user