filemode.c (littleutils-1.2.4.tar.lz) | : | filemode.c (littleutils-1.2.5.tar.lz) | ||
---|---|---|---|---|
/* filemode: Prints out a standard octal formatted file mode for the specified | /* filemode: Prints out a standard octal formatted file mode for the specified | |||
files. | files. | |||
Copyright (C) 2004-2020 by Brian Lindholm. | Copyright (C) 2004-2021 by Brian Lindholm. | |||
This file is part of the littleutils utility set. | This file is part of the littleutils utility set. | |||
The filemode utility is free software; you can redistribute it and/or modify | The filemode utility is free software; you can redistribute it and/or modify | |||
it under the terms of the GNU General Public License as published by the | it under the terms of the GNU General Public License as published by the | |||
Free Software Foundation; either version 3, or (at your option) any later | Free Software Foundation; either version 3, or (at your option) any later | |||
version. | version. | |||
The filemode utility is distributed in the hope that it will be useful, but | The filemode utility is distributed in the hope that it will be useful, but | |||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | |||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |||
more details. | more details. | |||
You should have received a copy of the GNU General Public License along with | You should have received a copy of the GNU General Public License along with | |||
the littleutils. If not, see <https://www.gnu.org/licenses/>. */ | the littleutils. If not, see <https://www.gnu.org/licenses/>. */ | |||
#include <config.h> | #include <config.h> | |||
#include <limits.h> | #include <limits.h> | |||
#include <stdio.h> | #ifdef HAVE_STDIO_H | |||
# include <stdio.h> | ||||
#endif | ||||
#ifdef HAVE_STRING_H | #ifdef HAVE_STRING_H | |||
# include <string.h> | # include <string.h> | |||
#endif | #endif | |||
#ifdef HAVE_SYS_STAT_H | #ifdef HAVE_SYS_STAT_H | |||
# include <sys/stat.h> | # include <sys/stat.h> | |||
#endif | #endif | |||
#ifdef HAVE_GETOPT_H | ||||
# include <getopt.h> | ||||
#endif | ||||
#ifdef HAVE_UNISTD_H | #ifdef HAVE_UNISTD_H | |||
# include <unistd.h> | # include <unistd.h> | |||
# define OPTEND -1 | # define OPTEND -1 | |||
#else | #else | |||
# define OPTEND EOF | # define OPTEND EOF | |||
#endif | #endif | |||
#ifdef HAVE_GETOPT_H | ||||
# include <getopt.h> | ||||
#endif | ||||
#ifdef __MINGW32__ | #ifdef __MINGW32__ | |||
extern int getopt (int argc, char * const *argv, const char *optstring); | extern int getopt (int argc, char * const *argv, const char *optstring); | |||
extern char *optarg; | extern char *optarg; | |||
extern int optind; | extern int optind; | |||
#endif | #endif | |||
#ifdef DJGPP | #ifdef DJGPP | |||
/* speed up stat command for DJGPP, but allow for executable check */ | /* speed up stat command for DJGPP, but allow for executable check */ | |||
unsigned short _djstat_flags = 63 - _STAT_EXEC_EXT; | unsigned short _djstat_flags = 63 - _STAT_EXEC_EXT; | |||
End of changes. 4 change blocks. | ||||
5 lines changed or deleted | 7 lines changed or added |