Ticket #1957: 0001-MC-4.7-patches-for-AIX.patch

File 0001-MC-4.7-patches-for-AIX.patch, 2.7 KB (added by tammer, 15 years ago)

0001-MC-4.7-patches-for-AIX.patch

  • m4.include/mc-cflags.m4

    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. 
    99 
    1010AC_DEFUN([MC_CHECK_ONE_CFLAG],[ 
    1111 
    12     AC_MSG_CHECKING([if gcc accepts $1]) 
     12  AC_MSG_CHECKING([if gcc accepts $1]) 
    1313 
    1414  safe_CFLAGS=$CFLAGS 
    1515  CFLAGS="$1" 
    AC_DEFUN([MC_CHECK_CFLAGS],[ 
    3737    mc_configured_cflags="" 
    3838 
    3939dnl Sorted -f options: 
     40dnl AC_MSG_CHECKING([CC is $CC]) 
     41case "$CC" in 
     42  gcc*) 
    4043    MC_CHECK_ONE_CFLAG([-fdiagnostics-show-option]) 
    4144dnl    MC_CHECK_ONE_CFLAG([-fno-stack-protector]) 
     45    ;; 
     46  *) 
     47    ;; 
     48esac 
    4249 
    4350dnl Sorted -W options: 
    4451    MC_CHECK_ONE_CFLAG([-Wcomment]) 
  • src/tty/tty-ncurses.c

    diff --git a/src/tty/tty-ncurses.c b/src/tty/tty-ncurses.c
    index 76b0f5f..65e410c 100644
    a b  
    5858/*** global variables **************************************************/ 
    5959 
    6060/*** file scope macro definitions **************************************/ 
     61#if defined(_AIX) && !defined(CTRL) 
     62#   define CTRL(x) ((x) & 0x1f) 
     63#endif 
    6164 
    6265/*** global variables **************************************************/ 
    6366 
  • src/unixcompat.h

    diff --git a/src/unixcompat.h b/src/unixcompat.h
    index e71332f..9ad6e31 100644
    a b  
    2020# include <sys/sysmacros.h>     /* AIX */ 
    2121#endif 
    2222 
     23#if defined(_AIX) 
     24# include <time.h>              /* AIX for tm */ 
     25#endif 
     26 
    2327#ifndef major 
    2428# warning major() is undefined. Device numbers will not be shown correctly. 
    2529# define major(devnum) (((devnum) >> 8) & 0xff) 
  • vfs/direntry.c

    diff --git a/vfs/direntry.c b/vfs/direntry.c
    index 9a41aa9..bcd4ccd 100644
    a b  
    3131#include <config.h> 
    3232 
    3333#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 */ 
    3536#include <time.h> 
    3637#include <sys/time.h>           /* gettimeofday() */ 
    3738 
  • vfs/vfs.c

    diff --git a/vfs/vfs.c b/vfs/vfs.c
    index 6ca2c75..d16f45b 100644
    a b  
    6767#include "smbfs.h" 
    6868#include "local.h" 
    6969 
     70#if defined(_AIX) && !defined(NAME_MAX) 
     71#  define NAME_MAX FILENAME_MAX 
     72#endif 
     73 
    7074/** They keep track of the current directory */ 
    7175static struct vfs_class *current_vfs; 
    7276static char *current_dir;