Ticket #3435: clang compiler fixes/cleanups.

Since O_* macros are used in lib/global.h, include <fcntl.h> there.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2015-04-11 12:30:34 +03:00
parent 517cc5cfe4
commit b698b7e834
33 changed files with 7 additions and 33 deletions

View File

@ -21,6 +21,9 @@
#include <sys/param.h>
#endif
/* for O_* macros */
#include <fcntl.h>
/* for sig_atomic_t */
#include <signal.h>

View File

@ -25,7 +25,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h> /* extern int errno */
#include "lib/global.h"

View File

@ -40,7 +40,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>

View File

@ -5,13 +5,13 @@
#ifndef MC_UTIL_H
#define MC_UTIL_H
#include "lib/global.h" /* include <glib.h> */
#include <sys/types.h>
#include <sys/stat.h>
#include <inttypes.h> /* uintmax_t */
#include <unistd.h>
#include "lib/global.h" /* include <glib.h> */
#include "lib/vfs/vfs.h"
/*** typedefs(not structures) and defined constants **********************************************/

View File

@ -44,7 +44,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif

View File

@ -58,8 +58,6 @@
#include <config.h>
#include <errno.h>
#include <fcntl.h> /* include fcntl.h -> sys/fcntl.h only */
/* includes fcntl.h see IEEE Std 1003.1-2008 */
#include <time.h>
#include <sys/time.h> /* gettimeofday() */
#include <inttypes.h> /* uintmax_t */

View File

@ -41,7 +41,6 @@
#include <sys/types.h>
#include <signal.h>
#include <ctype.h> /* is_digit() */
#include <fcntl.h>
#include <sys/stat.h>
#include <unistd.h>
#include <dirent.h>

View File

@ -14,7 +14,6 @@
#include <utime.h>
#endif
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <stddef.h>

View File

@ -33,7 +33,6 @@
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h> /* open() */
#include "lib/global.h"

View File

@ -40,7 +40,6 @@
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "lib/global.h"

View File

@ -37,7 +37,6 @@
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "lib/global.h"

View File

@ -42,7 +42,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h> /* waitpid() */
#include <fcntl.h>
#include "lib/global.h"

View File

@ -29,7 +29,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <fcntl.h>
#include "lib/global.h"
#include "lib/fileloc.h"

View File

@ -30,7 +30,6 @@
#include <sys/wait.h>
#include <signal.h>
#include <stdio.h>
#include <fcntl.h>
#include <sys/types.h>
#ifdef __FreeBSD__
#include <sys/consio.h>

View File

@ -64,7 +64,9 @@
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#include <termios.h>
#include "lib/unixcompat.h" /* STDERR_FILENO */

View File

@ -28,7 +28,6 @@
#include <config.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/types.h>

View File

@ -42,7 +42,6 @@
#include <sys/stat.h>
#include <stdint.h> /* UINTMAX_MAX */
#include <stdlib.h>
#include <fcntl.h>
#include "lib/global.h"

View File

@ -48,7 +48,6 @@
#include <errno.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <fcntl.h>
#include "lib/global.h"
#include "lib/tty/tty.h"

View File

@ -46,7 +46,6 @@
#endif
#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>
#include <pwd.h>
#include <grp.h>
#include <sys/time.h>

View File

@ -59,7 +59,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include "lib/global.h"
#include "lib/tty/tty.h"

View File

@ -35,7 +35,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/time.h>

View File

@ -39,7 +39,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>

View File

@ -39,7 +39,6 @@
#include <errno.h>
#include <string.h>
#include <signal.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/wait.h>
#ifdef HAVE_SYS_IOCTL_H

View File

@ -33,7 +33,6 @@
#include <config.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>

View File

@ -47,7 +47,6 @@
#include <sys/stat.h>
#include <unistd.h>
#include <signal.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/wait.h>

View File

@ -52,7 +52,6 @@
#include <config.h>
#include <errno.h>
#include <fcntl.h>
#include <pwd.h>
#include <grp.h>
#include <sys/time.h> /* gettimeofday() */

View File

@ -91,7 +91,6 @@ What to do with this?
#endif
#include <errno.h>
#include <ctype.h>
#include <fcntl.h>
#include <sys/time.h> /* gettimeofday() */
#include <inttypes.h> /* uintmax_t */

View File

@ -31,7 +31,6 @@
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include "lib/global.h"

View File

@ -43,7 +43,6 @@
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include "lib/global.h"
#include "lib/util.h"

View File

@ -39,7 +39,6 @@
#include <sys/types.h>
#include <errno.h>
#include <ctype.h>
#include <fcntl.h>
#ifdef hpux
/* major() and minor() macros (among other things) defined here for hpux */

View File

@ -48,7 +48,6 @@
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#ifdef HAVE_EXT2FS_EXT2_FS_H
#include <ext2fs/ext2_fs.h>

View File

@ -36,7 +36,6 @@
#include <config.h>
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h> /* uintmax_t */
#include "lib/global.h"

View File

@ -35,7 +35,6 @@
#include <config.h>
#include <errno.h>
#include <fcntl.h>
#include "lib/global.h"
#include "lib/tty/tty.h"