diff options
Diffstat (limited to 'src/system.h')
| -rw-r--r-- | src/system.h | 95 |
1 files changed, 34 insertions, 61 deletions
diff --git a/src/system.h b/src/system.h index 3a0550122..8de0f3cd2 100644 --- a/src/system.h +++ b/src/system.h @@ -44,16 +44,8 @@ you must include <sys/types.h> before including this file #include "configmake.h" -#if TIME_WITH_SYS_TIME -# include <sys/time.h> -# include <time.h> -#else -# if HAVE_SYS_TIME_H -# include <sys/time.h> -# else -# include <time.h> -# endif -#endif +#include <sys/time.h> +#include <time.h> /* Since major is a function on SVR4, we can't use `ifndef major'. */ #if MAJOR_IN_MKDEV @@ -86,16 +78,8 @@ you must include <sys/types.h> before including this file #include <errno.h> -/* Some systems don't define the following symbols. */ -#ifndef EDQUOT -# define EDQUOT (-1) -#endif -#ifndef EISDIR -# define EISDIR (-1) -#endif -#ifndef ENOSYS -# define ENOSYS (-1) -#endif +/* Some systems don't define this; POSIX mentions it but says it is + obsolete, so gnulib does not provide it either. */ #ifndef ENODATA # define ENODATA (-1) #endif @@ -107,8 +91,10 @@ you must include <sys/types.h> before including this file /* Exit statuses for programs like 'env' that exec other programs. */ enum { - EXIT_CANNOT_INVOKE = 126, - EXIT_ENOENT = 127 + EXIT_TIMEDOUT = 124, /* Time expired before child completed. */ + EXIT_CANCELED = 125, /* Internal error prior to exec attempt. */ + EXIT_CANNOT_INVOKE = 126, /* Program located, but not usable. */ + EXIT_ENOENT = 127 /* Could not find program to exec. */ }; #include "exitfail.h" @@ -123,13 +109,6 @@ initialize_exit_failure (int status) #include <fcntl.h> -#ifndef F_OK -# define F_OK 0 -# define X_OK 1 -# define W_OK 2 -# define R_OK 4 -#endif - #include <dirent.h> #ifndef _D_EXACT_NAMLEN # define _D_EXACT_NAMLEN(dp) strlen ((dp)->d_name) @@ -279,30 +258,6 @@ select_plural (uintmax_t n) #define STREQ(a, b) (strcmp (a, b) == 0) -#if !HAVE_DECL_FREE -void free (); -#endif - -#if !HAVE_DECL_MALLOC -char *malloc (); -#endif - -#if !HAVE_DECL_MEMCHR -char *memchr (); -#endif - -#if !HAVE_DECL_REALLOC -char *realloc (); -#endif - -#if !HAVE_DECL_GETENV -char *getenv (); -#endif - -#if !HAVE_DECL_LSEEK -off_t lseek (); -#endif - #if !HAVE_DECL_GETLOGIN char *getlogin (); #endif @@ -547,10 +502,6 @@ enum while (0) #endif -#ifndef EOVERFLOW -# define EOVERFLOW EINVAL -#endif - #if ! HAVE_SYNC # define sync() /* empty */ #endif @@ -616,9 +567,27 @@ ptr_align (void const *ptr, size_t alignment) ? false : (((Accum) = (Accum) * 10 + (Digit_val)), true)) \ ) -#include "hard-locale.h" static inline void -emit_bug_reporting_address (void) +emit_size_note (void) +{ + fputs (_("\n\ +SIZE may be (or may be an integer optionally followed by) one of following:\n\ +KB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y.\n\ +"), stdout); +} + +static inline void +emit_blocksize_note (char const *program) +{ + printf (_("\n\ +Display values are in units of the first available SIZE from --block-size,\n\ +and the %s_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE environment variables.\n\ +Otherwise, units default to 1024 bytes (or 512 if POSIXLY_CORRECT is set).\n\ +"), program); +} + +static inline void +emit_ancillary_info (void) { printf (_("\nReport %s bugs to %s\n"), last_component (program_name), PACKAGE_BUGREPORT); @@ -627,8 +596,10 @@ emit_bug_reporting_address (void) PACKAGE_NAME, PACKAGE); fputs (_("General help using GNU software: <http://www.gnu.org/gethelp/>\n"), stdout); - - if (hard_locale (LC_MESSAGES)) + /* Don't output this redundant message for English locales. + Note we still output for 'C' so that it gets included in the man page. */ + const char *lc_messages = setlocale (LC_MESSAGES, NULL); + if (lc_messages && strncmp (lc_messages, "en_", 3)) { /* TRANSLATORS: Replace LANG_CODE in this URL with your language code <http://translationproject.org/team/LANG_CODE.html> to form one of @@ -638,6 +609,8 @@ emit_bug_reporting_address (void) "<http://translationproject.org/team/>\n"), last_component (program_name)); } + printf (_("For complete documentation, run: " + "info coreutils '%s invocation'\n"), last_component (program_name)); } #include "inttostr.h" |
