GNUmakefile, intcmp(1), npc(1), scrut(1), str(1), strcmp(1), include/sysexits.h: added fallback header file for when systems don’t have sysexits.h(3)
This commit is contained in:
@@ -19,10 +19,8 @@
|
||||
#include <errno.h> /* errno */
|
||||
#include <stdio.h> /* fprintf(3), stderr */
|
||||
#include <stdlib.h> /* strtol(3), size_t, EXIT_FAILURE */
|
||||
#ifndef EX_USAGE
|
||||
# define EX_USAGE EXIT_FAILURE
|
||||
#endif
|
||||
#include <unistd.h> /* getopt(3), optind */
|
||||
#include <sysexits.h>
|
||||
|
||||
/* 0b00? */ /* Equal | -e | 0b001 | 1 */
|
||||
#define EQUAL 0x01 /* Greater | -g | 0b010 | 2 */
|
||||
|
||||
@@ -20,12 +20,7 @@
|
||||
* EOF */
|
||||
#include <stdlib.h> /* EXIT_FAILURE, EXIT_SUCCESS */
|
||||
#include <unistd.h> /* getopt(3) */
|
||||
#if !defined EX_USAGE
|
||||
# define EX_USAGE EXIT_FAILURE
|
||||
#endif
|
||||
#if !defined EX_OK
|
||||
# define EX_OK EXIT_SUCCESS
|
||||
#endif
|
||||
#include <sysexits.h>
|
||||
|
||||
int main(int argc, char *argv[]){
|
||||
int c;
|
||||
|
||||
@@ -19,13 +19,11 @@
|
||||
#include <stdio.h> /* fprintf(3), stderr, NULL */
|
||||
#include <stdlib.h> /* EXIT_FAILURE */
|
||||
#include <string.h> /* strchr(3) */
|
||||
#ifndef EX_USAGE
|
||||
# define EX_USAGE EXIT_FAILURE
|
||||
#endif
|
||||
#include <unistd.h> /* access(3), getopt(3), F_OK, R_OK, W_OK, X_OK */
|
||||
#include <sys/stat.h> /* lstat(3), stat struct, S_ISBLK, S_ISCHR, S_ISDIR,
|
||||
* S_ISFIFO, S_ISGID, S_ISREG, S_ISLNK, S_ISSOCK,
|
||||
* S_ISUID, S_ISVTX */
|
||||
#include <sysexits.h>
|
||||
|
||||
static char args[] = "bcdefghkprsuwxLS";
|
||||
static char ops[(sizeof args) / (sizeof *args)];
|
||||
|
||||
@@ -22,9 +22,7 @@
|
||||
#include <stdio.h> /* fprintf(3) */
|
||||
#include <stdlib.h> /* EXIT_FAILURE */
|
||||
#include <string.h> /* strcmp(3) */
|
||||
#if !defined EX_USAGE
|
||||
# define EX_USAGE EXIT_FAILURE
|
||||
#endif
|
||||
#include <sysexits.h>
|
||||
|
||||
static char *program_name = "str";
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#include <stdio.h> /* fprintf(3), stderr */
|
||||
#include <stdlib.h> /* EXIT_FAILURE */
|
||||
#if !defined EX_USAGE
|
||||
# define EX_USAGE EXIT_FAILURE
|
||||
#endif
|
||||
#include <sysexits.h>
|
||||
|
||||
static char *program_name = "strcmp";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user