From 4581198589f691ce1f8514bd9966a2e7f4650b38 Mon Sep 17 00:00:00 2001
From: Rainer Tammer <tammer@tammer.net>
Date: Wed, 13 Jan 2010 17:09:04 +0100
Subject: [PATCH] MC 4.7 patches for AIX
---
m4.include/mc-cflags.m4 | 9 ++++++++-
src/tty/tty-ncurses.c | 3 +++
src/unixcompat.h | 4 ++++
vfs/direntry.c | 3 ++-
vfs/vfs.c | 4 ++++
5 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/m4.include/mc-cflags.m4 b/m4.include/mc-cflags.m4
index d7d4c0b..1918910 100644
a
|
b
|
dnl @copyright Free Software Foundation, Inc. |
9 | 9 | |
10 | 10 | AC_DEFUN([MC_CHECK_ONE_CFLAG],[ |
11 | 11 | |
12 | | AC_MSG_CHECKING([if gcc accepts $1]) |
| 12 | AC_MSG_CHECKING([if gcc accepts $1]) |
13 | 13 | |
14 | 14 | safe_CFLAGS=$CFLAGS |
15 | 15 | CFLAGS="$1" |
… |
… |
AC_DEFUN([MC_CHECK_CFLAGS],[ |
37 | 37 | mc_configured_cflags="" |
38 | 38 | |
39 | 39 | dnl Sorted -f options: |
| 40 | dnl AC_MSG_CHECKING([CC is $CC]) |
| 41 | case "$CC" in |
| 42 | gcc*) |
40 | 43 | MC_CHECK_ONE_CFLAG([-fdiagnostics-show-option]) |
41 | 44 | dnl MC_CHECK_ONE_CFLAG([-fno-stack-protector]) |
| 45 | ;; |
| 46 | *) |
| 47 | ;; |
| 48 | esac |
42 | 49 | |
43 | 50 | dnl Sorted -W options: |
44 | 51 | MC_CHECK_ONE_CFLAG([-Wcomment]) |
diff --git a/src/tty/tty-ncurses.c b/src/tty/tty-ncurses.c
index 76b0f5f..65e410c 100644
a
|
b
|
|
58 | 58 | /*** global variables **************************************************/ |
59 | 59 | |
60 | 60 | /*** file scope macro definitions **************************************/ |
| 61 | #if defined(_AIX) && !defined(CTRL) |
| 62 | # define CTRL(x) ((x) & 0x1f) |
| 63 | #endif |
61 | 64 | |
62 | 65 | /*** global variables **************************************************/ |
63 | 66 | |
diff --git a/src/unixcompat.h b/src/unixcompat.h
index e71332f..9ad6e31 100644
a
|
b
|
|
20 | 20 | # include <sys/sysmacros.h> /* AIX */ |
21 | 21 | #endif |
22 | 22 | |
| 23 | #if defined(_AIX) |
| 24 | # include <time.h> /* AIX for tm */ |
| 25 | #endif |
| 26 | |
23 | 27 | #ifndef major |
24 | 28 | # warning major() is undefined. Device numbers will not be shown correctly. |
25 | 29 | # define major(devnum) (((devnum) >> 8) & 0xff) |
diff --git a/vfs/direntry.c b/vfs/direntry.c
index 9a41aa9..bcd4ccd 100644
a
|
b
|
|
31 | 31 | #include <config.h> |
32 | 32 | |
33 | 33 | #include <errno.h> |
34 | | #include <sys/fcntl.h> |
| 34 | #include <fcntl.h> /* include fcntl.h -> sys/fcntl.h only */ |
| 35 | /* includes fcntl.h see IEEE Std 1003.1-2008 */ |
35 | 36 | #include <time.h> |
36 | 37 | #include <sys/time.h> /* gettimeofday() */ |
37 | 38 | |
diff --git a/vfs/vfs.c b/vfs/vfs.c
index 6ca2c75..d16f45b 100644
a
|
b
|
|
67 | 67 | #include "smbfs.h" |
68 | 68 | #include "local.h" |
69 | 69 | |
| 70 | #if defined(_AIX) && !defined(NAME_MAX) |
| 71 | # define NAME_MAX FILENAME_MAX |
| 72 | #endif |
| 73 | |
70 | 74 | /** They keep track of the current directory */ |
71 | 75 | static struct vfs_class *current_vfs; |
72 | 76 | static char *current_dir; |