mirror of
https://github.com/coreutils/coreutils.git
synced 2024-12-04 07:24:22 +08:00
Include "error.h" rather than simply declaring `void error ();'.
This commit is contained in:
parent
dcb4b37240
commit
59097c0922
@ -22,9 +22,11 @@
|
||||
#include <sys/types.h>
|
||||
#include <grp.h>
|
||||
#include <getopt.h>
|
||||
|
||||
#include "system.h"
|
||||
#include "version.h"
|
||||
#include "safe-lstat.h"
|
||||
#include "error.h"
|
||||
|
||||
#ifndef _POSIX_VERSION
|
||||
struct group *getgrnam ();
|
||||
@ -38,7 +40,6 @@ char *group_member ();
|
||||
char *savedir ();
|
||||
char *xmalloc ();
|
||||
char *xrealloc ();
|
||||
void error ();
|
||||
|
||||
static int change_file_group ();
|
||||
static int change_dir_group ();
|
||||
|
@ -27,13 +27,14 @@
|
||||
#include <stdio.h>
|
||||
#include <getopt.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "modechange.h"
|
||||
#include "system.h"
|
||||
#include "version.h"
|
||||
#include "safe-stat.h"
|
||||
#include "safe-lstat.h"
|
||||
#include "error.h"
|
||||
|
||||
void error ();
|
||||
void mode_string ();
|
||||
char *savedir ();
|
||||
void strip_trailing_slashes ();
|
||||
|
@ -34,9 +34,11 @@
|
||||
#include <pwd.h>
|
||||
#include <grp.h>
|
||||
#include <getopt.h>
|
||||
|
||||
#include "system.h"
|
||||
#include "version.h"
|
||||
#include "safe-lstat.h"
|
||||
#include "error.h"
|
||||
|
||||
#ifndef _POSIX_VERSION
|
||||
struct passwd *getpwnam ();
|
||||
@ -54,7 +56,6 @@ char *parse_user_spec ();
|
||||
void strip_trailing_slashes ();
|
||||
char *xmalloc ();
|
||||
char *xrealloc ();
|
||||
void error ();
|
||||
int isnumber ();
|
||||
|
||||
static int change_file_owner ();
|
||||
|
7
src/dd.c
7
src/dd.c
@ -64,6 +64,7 @@
|
||||
|
||||
#include "system.h"
|
||||
#include "version.h"
|
||||
#include "error.h"
|
||||
|
||||
#define equal(p, q) (strcmp ((p),(q)) == 0)
|
||||
#define max(a, b) ((a) > (b) ? (a) : (b))
|
||||
@ -91,8 +92,8 @@
|
||||
#define C_TWOBUFS 04000
|
||||
|
||||
char *xmalloc ();
|
||||
void error ();
|
||||
int safe_read ();
|
||||
int full_write ();
|
||||
|
||||
static RETSIGTYPE interrupt_handler ();
|
||||
static int bit_count ();
|
||||
@ -443,7 +444,9 @@ skip (fdesc, file, records, blocksize, buf)
|
||||
{
|
||||
while (records-- > 0)
|
||||
{
|
||||
nread = safe_read (fdesc, buf, blocksize).
|
||||
int nread;
|
||||
|
||||
nread = safe_read (fdesc, buf, blocksize);
|
||||
if (nread < 0)
|
||||
{
|
||||
error (0, errno, "%s", file);
|
||||
|
3
src/df.c
3
src/df.c
@ -37,15 +37,16 @@
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <getopt.h>
|
||||
|
||||
#include "mountlist.h"
|
||||
#include "fsusage.h"
|
||||
#include "system.h"
|
||||
#include "version.h"
|
||||
#include "safe-stat.h"
|
||||
#include "error.h"
|
||||
|
||||
char *xmalloc ();
|
||||
char *xstrdup ();
|
||||
void error ();
|
||||
|
||||
static int selected_fstype ();
|
||||
static int excluded_fstype ();
|
||||
|
3
src/du.c
3
src/du.c
@ -44,10 +44,12 @@
|
||||
#include <stdio.h>
|
||||
#include <getopt.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "system.h"
|
||||
#include "version.h"
|
||||
#include "safe-stat.h"
|
||||
#include "safe-lstat.h"
|
||||
#include "error.h"
|
||||
|
||||
/* Initial number of entries in each hash table entry's table of inodes. */
|
||||
#define INITIAL_HASH_MODULE 100
|
||||
@ -93,7 +95,6 @@ char *savedir ();
|
||||
char *xgetcwd ();
|
||||
char *xmalloc ();
|
||||
char *xrealloc ();
|
||||
void error ();
|
||||
|
||||
static int hash_insert ();
|
||||
static int hash_insert2 ();
|
||||
|
@ -58,11 +58,13 @@
|
||||
#include <sys/types.h>
|
||||
#include <pwd.h>
|
||||
#include <grp.h>
|
||||
|
||||
#include "system.h"
|
||||
#include "version.h"
|
||||
#include "safe-stat.h"
|
||||
#include "modechange.h"
|
||||
#include "makepath.h"
|
||||
#include "error.h"
|
||||
|
||||
#ifdef _POSIX_VERSION
|
||||
#include <sys/wait.h>
|
||||
@ -88,7 +90,6 @@ int wait ();
|
||||
char *basename ();
|
||||
char *stpcpy ();
|
||||
char *xmalloc ();
|
||||
void error ();
|
||||
int safe_read ();
|
||||
int full_write ();
|
||||
int isdir ();
|
||||
|
3
src/ln.c
3
src/ln.c
@ -25,11 +25,13 @@
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <getopt.h>
|
||||
|
||||
#include "system.h"
|
||||
#include "backupfile.h"
|
||||
#include "version.h"
|
||||
#include "safe-lstat.h"
|
||||
#include "safe-stat.h"
|
||||
#include "error.h"
|
||||
|
||||
int link (); /* Some systems don't declare this anywhere. */
|
||||
|
||||
@ -61,7 +63,6 @@ char *basename ();
|
||||
enum backup_type get_version ();
|
||||
int isdir ();
|
||||
int yesno ();
|
||||
void error ();
|
||||
void strip_trailing_slashes ();
|
||||
char *stpcpy ();
|
||||
|
||||
|
3
src/ls.c
3
src/ls.c
@ -51,6 +51,7 @@
|
||||
PATH_MAX. */
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
#include "system.h"
|
||||
#include <fnmatch.h>
|
||||
|
||||
@ -59,6 +60,7 @@
|
||||
#include "version.h"
|
||||
#include "safe-stat.h"
|
||||
#include "safe-lstat.h"
|
||||
#include "error.h"
|
||||
|
||||
#define obstack_chunk_alloc xmalloc
|
||||
#define obstack_chunk_free free
|
||||
@ -95,7 +97,6 @@ char *getuser ();
|
||||
char *xmalloc ();
|
||||
char *xrealloc ();
|
||||
int argmatch ();
|
||||
void error ();
|
||||
void invalid_arg ();
|
||||
|
||||
static char *make_link_path ();
|
||||
|
@ -31,12 +31,12 @@
|
||||
#include <stdio.h>
|
||||
#include <getopt.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "system.h"
|
||||
#include "modechange.h"
|
||||
#include "makepath.h"
|
||||
#include "version.h"
|
||||
|
||||
void error ();
|
||||
#include "error.h"
|
||||
|
||||
static void usage ();
|
||||
|
||||
|
@ -26,11 +26,11 @@
|
||||
#include <stdio.h>
|
||||
#include <getopt.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "system.h"
|
||||
#include "modechange.h"
|
||||
#include "version.h"
|
||||
|
||||
void error ();
|
||||
#include "error.h"
|
||||
|
||||
static void usage ();
|
||||
|
||||
|
@ -31,11 +31,11 @@
|
||||
#include <stdio.h>
|
||||
#include <getopt.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "system.h"
|
||||
#include "modechange.h"
|
||||
#include "version.h"
|
||||
|
||||
void error ();
|
||||
#include "error.h"
|
||||
|
||||
static void usage ();
|
||||
|
||||
|
3
src/mv.c
3
src/mv.c
@ -45,10 +45,12 @@
|
||||
#include <stdio.h>
|
||||
#include <getopt.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "system.h"
|
||||
#include "backupfile.h"
|
||||
#include "version.h"
|
||||
#include "safe-lstat.h"
|
||||
#include "error.h"
|
||||
|
||||
#ifndef _POSIX_VERSION
|
||||
uid_t geteuid ();
|
||||
@ -58,7 +60,6 @@ char *basename ();
|
||||
enum backup_type get_version ();
|
||||
int isdir ();
|
||||
int yesno ();
|
||||
void error ();
|
||||
int safe_read ();
|
||||
int full_write ();
|
||||
void strip_trailing_slashes ();
|
||||
|
3
src/rm.c
3
src/rm.c
@ -21,9 +21,11 @@
|
||||
#include <stdio.h>
|
||||
#include <getopt.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "system.h"
|
||||
#include "version.h"
|
||||
#include "safe-lstat.h"
|
||||
#include "error.h"
|
||||
|
||||
#ifdef D_INO_IN_DIRENT
|
||||
#define D_INO(dp) ((dp)->d_ino)
|
||||
@ -38,7 +40,6 @@ char *xmalloc ();
|
||||
char *xrealloc ();
|
||||
int eaccess_stat ();
|
||||
int yesno ();
|
||||
void error ();
|
||||
void strip_trailing_slashes ();
|
||||
|
||||
static int clear_directory ();
|
||||
|
@ -26,10 +26,11 @@
|
||||
#include <stdio.h>
|
||||
#include <getopt.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "system.h"
|
||||
#include "version.h"
|
||||
#include "error.h"
|
||||
|
||||
void error ();
|
||||
void strip_trailing_slashes ();
|
||||
|
||||
static void remove_parents ();
|
||||
|
@ -24,8 +24,7 @@
|
||||
#include "system.h"
|
||||
#include "long-options.h"
|
||||
#include "version.h"
|
||||
|
||||
void error ();
|
||||
#include "error.h"
|
||||
|
||||
/* The name this program was run with. */
|
||||
char *program_name;
|
||||
|
@ -36,9 +36,11 @@
|
||||
#include <stdio.h>
|
||||
#include <getopt.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "system.h"
|
||||
#include "version.h"
|
||||
#include "safe-stat.h"
|
||||
#include "error.h"
|
||||
|
||||
#ifndef STDC_HEADERS
|
||||
time_t mktime ();
|
||||
@ -48,7 +50,6 @@ time_t time ();
|
||||
int argmatch ();
|
||||
time_t get_date ();
|
||||
time_t posixtime ();
|
||||
void error ();
|
||||
int safe_read ();
|
||||
int full_write ();
|
||||
void invalid_arg ();
|
||||
|
Loading…
Reference in New Issue
Block a user