Ticket #3435: mc_fcntl.h.diff

File mc_fcntl.h.diff, 10.0 KB (added by andrew_b, 9 years ago)

Include <fcntl.h> via "lib/global.h".

  • lib/global.h

    diff --git a/lib/global.h b/lib/global.h
    index 0e7b8b6..3eaabaf 100644
    a b  
    2121#include <sys/param.h> 
    2222#endif 
    2323 
     24/* O_* macros */ 
     25#ifdef HAVE_FCNTL_H 
     26#include <fcntl.h> 
     27#endif 
     28 
    2429/* for sig_atomic_t */ 
    2530#include <signal.h> 
    2631 
  • lib/mcconfig/common.c

    diff --git a/lib/mcconfig/common.c b/lib/mcconfig/common.c
    index 1d1944d..515fa29 100644
    a b  
    2525#include <sys/types.h> 
    2626#include <sys/stat.h> 
    2727#include <unistd.h> 
    28 #include <fcntl.h> 
    2928#include <errno.h>              /* extern int errno */ 
    3029 
    3130#include "lib/global.h" 
  • lib/util.c

    diff --git a/lib/util.c b/lib/util.c
    index 37d5fba..db0557d 100644
    a b  
    4040#include <stdio.h> 
    4141#include <stdlib.h> 
    4242#include <string.h> 
    43 #include <fcntl.h> 
    4443#include <sys/time.h> 
    4544#include <sys/types.h> 
    4645#include <sys/stat.h> 
  • lib/util.h

    diff --git a/lib/util.h b/lib/util.h
    index 3187451..dd2e697 100644
    a b  
    55#ifndef MC_UTIL_H 
    66#define MC_UTIL_H 
    77 
    8 #include "lib/global.h"         /* include <glib.h> */ 
    9  
    108#include <sys/types.h> 
    119#include <sys/stat.h> 
    1210#include <inttypes.h>           /* uintmax_t */ 
    1311#include <unistd.h> 
    1412 
     13#include "lib/global.h"         /* include <glib.h> */ 
     14 
    1515#include "lib/vfs/vfs.h" 
    1616 
    1717/*** typedefs(not structures) and defined constants **********************************************/ 
  • lib/utilunix.c

    diff --git a/lib/utilunix.c b/lib/utilunix.c
    index 5764c8b..07093f7 100644
    a b  
    4444#include <stdio.h> 
    4545#include <stdlib.h> 
    4646#include <string.h> 
    47 #include <fcntl.h> 
    4847#ifdef HAVE_SYS_PARAM_H 
    4948#include <sys/param.h> 
    5049#endif 
  • lib/vfs/direntry.c

    diff --git a/lib/vfs/direntry.c b/lib/vfs/direntry.c
    index 1305c8e..afb4746 100644
    a b  
    5858#include <config.h> 
    5959 
    6060#include <errno.h> 
    61 #include <fcntl.h>              /* include fcntl.h -> sys/fcntl.h only       */ 
    62                                 /* includes fcntl.h see IEEE Std 1003.1-2008 */ 
    6361#include <time.h> 
    6462#include <sys/time.h>           /* gettimeofday() */ 
    6563#include <inttypes.h>           /* uintmax_t */ 
  • lib/vfs/interface.c

    diff --git a/lib/vfs/interface.c b/lib/vfs/interface.c
    index ca966c1..8c54a93 100644
    a b  
    4141#include <sys/types.h> 
    4242#include <signal.h> 
    4343#include <ctype.h>              /* is_digit() */ 
    44 #include <fcntl.h> 
    4544#include <sys/stat.h> 
    4645#include <unistd.h> 
    4746#include <dirent.h> 
  • lib/vfs/vfs.h

    diff --git a/lib/vfs/vfs.h b/lib/vfs/vfs.h
    index 309072d..037f889 100644
    a b  
    1414#include <utime.h> 
    1515#endif 
    1616#include <stdio.h> 
    17 #include <fcntl.h> 
    1817#include <unistd.h> 
    1918#include <stddef.h> 
    2019 
  • lib/widget/dialog.c

    diff --git a/lib/widget/dialog.c b/lib/widget/dialog.c
    index 917c818..5531aad 100644
    a b  
    3333#include <string.h> 
    3434#include <sys/types.h> 
    3535#include <sys/stat.h> 
    36 #include <fcntl.h>              /* open() */ 
    3736 
    3837#include "lib/global.h" 
    3938 
  • lib/widget/history.c

    diff --git a/lib/widget/history.c b/lib/widget/history.c
    index b1fb5eb..8b1e724 100644
    a b  
    4040#include <string.h> 
    4141#include <sys/types.h> 
    4242#include <sys/stat.h> 
    43 #include <fcntl.h> 
    4443 
    4544#include "lib/global.h" 
    4645 
  • lib/widget/input.c

    diff --git a/lib/widget/input.c b/lib/widget/input.c
    index 070c6dc..9c0d0c0 100644
    a b  
    3737#include <stdlib.h> 
    3838#include <sys/types.h> 
    3939#include <sys/stat.h> 
    40 #include <fcntl.h> 
    4140 
    4241#include "lib/global.h" 
    4342 
  • src/background.c

    diff --git a/src/background.c b/src/background.c
    index 580aef7..31bd752 100644
    a b  
    4242#include <sys/types.h> 
    4343#include <sys/stat.h> 
    4444#include <sys/wait.h>           /* waitpid() */ 
    45 #include <fcntl.h> 
    4645 
    4746#include "lib/global.h" 
    4847 
  • src/clipboard.c

    diff --git a/src/clipboard.c b/src/clipboard.c
    index 7395ea0..26745f6 100644
    a b  
    2929#include <stdio.h> 
    3030#include <stdlib.h> 
    3131#include <sys/types.h> 
    32 #include <fcntl.h> 
    3332 
    3433#include "lib/global.h" 
    3534#include "lib/fileloc.h" 
  • src/cons.handler.c

    diff --git a/src/cons.handler.c b/src/cons.handler.c
    index a52bd07..365b2e8 100644
    a b  
    3030#include <sys/wait.h> 
    3131#include <signal.h> 
    3232#include <stdio.h> 
    33 #include <fcntl.h> 
    3433#include <sys/types.h> 
    3534#ifdef __FreeBSD__ 
    3635#include <sys/consio.h> 
  • src/consaver/cons.saver.c

    diff --git a/src/consaver/cons.saver.c b/src/consaver/cons.saver.c
    index 78ae632..5068994 100644
    a b  
    6464#ifdef HAVE_SYS_IOCTL_H 
    6565#include <sys/ioctl.h> 
    6666#endif 
     67#ifdef HAVE_FCNTL_H 
    6768#include <fcntl.h> 
     69#endif 
    6870#include <termios.h> 
    6971 
    7072#include "lib/unixcompat.h"     /* STDERR_FILENO */ 
  • src/diffviewer/ydiff.c

    diff --git a/src/diffviewer/ydiff.c b/src/diffviewer/ydiff.c
    index c39cc30..ab6388c 100644
    a b  
    2828#include <config.h> 
    2929#include <ctype.h> 
    3030#include <errno.h> 
    31 #include <fcntl.h> 
    3231#include <stdlib.h> 
    3332#include <sys/stat.h> 
    3433#include <sys/types.h> 
  • src/editor/edit.c

    diff --git a/src/editor/edit.c b/src/editor/edit.c
    index 3fae74b..877621a 100644
    a b  
    4242#include <sys/stat.h> 
    4343#include <stdint.h>             /* UINTMAX_MAX */ 
    4444#include <stdlib.h> 
    45 #include <fcntl.h> 
    4645 
    4746#include "lib/global.h" 
    4847 
  • src/editor/editcmd.c

    diff --git a/src/editor/editcmd.c b/src/editor/editcmd.c
    index 534a272..246e84d 100644
    a b  
    4848#include <errno.h> 
    4949#include <sys/stat.h> 
    5050#include <stdlib.h> 
    51 #include <fcntl.h> 
    5251 
    5352#include "lib/global.h" 
    5453#include "lib/tty/tty.h" 
  • src/filemanager/cmd.c

    diff --git a/src/filemanager/cmd.c b/src/filemanager/cmd.c
    index 031fb10..e23ac01 100644
    a b  
    4646#endif 
    4747#include <unistd.h> 
    4848#include <stdlib.h> 
    49 #include <fcntl.h> 
    5049#include <pwd.h> 
    5150#include <grp.h> 
    5251#include <sys/time.h> 
  • src/filemanager/file.c

    diff --git a/src/filemanager/file.c b/src/filemanager/file.c
    index 0967ac6..acaa194 100644
    a b  
    5959#include <sys/types.h> 
    6060#include <sys/stat.h> 
    6161#include <unistd.h> 
    62 #include <fcntl.h> 
    6362 
    6463#include "lib/global.h" 
    6564#include "lib/tty/tty.h" 
  • src/filemanager/find.c

    diff --git a/src/filemanager/find.c b/src/filemanager/find.c
    index 98604fd..06b6dc4 100644
    a b  
    3535#include <stdio.h> 
    3636#include <stdlib.h> 
    3737#include <string.h> 
    38 #include <fcntl.h> 
    3938#include <sys/stat.h> 
    4039#include <sys/time.h> 
    4140 
  • src/filemanager/midnight.c

    diff --git a/src/filemanager/midnight.c b/src/filemanager/midnight.c
    index 2a17ec9..b515ea8 100644
    a b  
    3939#include <stdio.h> 
    4040#include <stdlib.h> 
    4141#include <string.h> 
    42 #include <fcntl.h> 
    4342#include <sys/types.h> 
    4443#include <sys/stat.h> 
    4544#include <sys/wait.h> 
  • src/subshell.c

    diff --git a/src/subshell.c b/src/subshell.c
    index c91635c..49a32cd 100644
    a b  
    3939#include <errno.h> 
    4040#include <string.h> 
    4141#include <signal.h> 
    42 #include <fcntl.h> 
    4342#include <sys/types.h> 
    4443#include <sys/wait.h> 
    4544#ifdef HAVE_SYS_IOCTL_H 
  • src/vfs/cpio/cpio.c

    diff --git a/src/vfs/cpio/cpio.c b/src/vfs/cpio/cpio.c
    index e53e203..d30c1a5 100644
    a b  
    3333#include <config.h> 
    3434 
    3535#include <errno.h> 
    36 #include <fcntl.h> 
    3736#include <sys/types.h> 
    3837#include <sys/stat.h> 
    3938 
  • src/vfs/extfs/extfs.c

    diff --git a/src/vfs/extfs/extfs.c b/src/vfs/extfs/extfs.c
    index 7aaf3b7..2147a2e 100644
    a b  
    4747#include <sys/stat.h> 
    4848#include <unistd.h> 
    4949#include <signal.h> 
    50 #include <fcntl.h> 
    5150#include <errno.h> 
    5251#include <sys/wait.h> 
    5352 
  • src/vfs/fish/fish.c

    diff --git a/src/vfs/fish/fish.c b/src/vfs/fish/fish.c
    index af5c190..5be222c 100644
    a b  
    5252 
    5353#include <config.h> 
    5454#include <errno.h> 
    55 #include <fcntl.h> 
    5655#include <pwd.h> 
    5756#include <grp.h> 
    5857#include <sys/time.h>           /* gettimeofday() */ 
  • src/vfs/ftpfs/ftpfs.c

    diff --git a/src/vfs/ftpfs/ftpfs.c b/src/vfs/ftpfs/ftpfs.c
    index 3acc602..c84abf0 100644
    a b What to do with this? 
    9191#endif 
    9292#include <errno.h> 
    9393#include <ctype.h> 
    94 #include <fcntl.h> 
    9594#include <sys/time.h>           /* gettimeofday() */ 
    9695#include <inttypes.h>           /* uintmax_t */ 
    9796 
  • src/vfs/local/local.c

    diff --git a/src/vfs/local/local.c b/src/vfs/local/local.c
    index ededc25..7ea70f2 100644
    a b  
    3131#include <unistd.h> 
    3232#include <stdio.h> 
    3333#include <string.h> 
    34 #include <fcntl.h> 
    3534 
    3635#include "lib/global.h" 
    3736 
  • src/vfs/sfs/sfs.c

    diff --git a/src/vfs/sfs/sfs.c b/src/vfs/sfs/sfs.c
    index cf97a0f..d864c46 100644
    a b  
    4343#include <unistd.h> 
    4444#include <stdio.h> 
    4545#include <string.h> 
    46 #include <fcntl.h> 
    4746 
    4847#include "lib/global.h" 
    4948#include "lib/util.h" 
  • src/vfs/tar/tar.c

    diff --git a/src/vfs/tar/tar.c b/src/vfs/tar/tar.c
    index ade464c..74e1232 100644
    a b  
    3939#include <sys/types.h> 
    4040#include <errno.h> 
    4141#include <ctype.h> 
    42 #include <fcntl.h> 
    4342 
    4443#ifdef hpux 
    4544/* major() and minor() macros (among other things) defined here for hpux */ 
  • src/vfs/undelfs/undelfs.c

    diff --git a/src/vfs/undelfs/undelfs.c b/src/vfs/undelfs/undelfs.c
    index a8e4dd4..2ad8be2 100644
    a b  
    4848#include <errno.h> 
    4949#include <stdio.h> 
    5050#include <stdlib.h> 
    51 #include <fcntl.h> 
    5251 
    5352#ifdef HAVE_EXT2FS_EXT2_FS_H 
    5453#include <ext2fs/ext2_fs.h> 
  • src/viewer/hex.c

    diff --git a/src/viewer/hex.c b/src/viewer/hex.c
    index c12bebe..e17b9ae 100644
    a b  
    3636#include <config.h> 
    3737 
    3838#include <errno.h> 
    39 #include <fcntl.h> 
    4039#include <inttypes.h>           /* uintmax_t */ 
    4140 
    4241#include "lib/global.h" 
  • src/viewer/mcviewer.c

    diff --git a/src/viewer/mcviewer.c b/src/viewer/mcviewer.c
    index 52ecd01..a34099b 100644
    a b  
    3535 
    3636#include <config.h> 
    3737#include <errno.h> 
    38 #include <fcntl.h> 
    3938 
    4039#include "lib/global.h" 
    4140#include "lib/tty/tty.h"