Mercurial > vim
comparison src/os_unix.h @ 7598:1a528724f9d6 v7.4.1098
commit https://github.com/vim/vim/commit/b7604cc19fa1db6a8182546bf662aa13d4574d7a
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jan 15 21:23:22 2016 +0100
patch 7.4.1098
Problem: Still using old style C function declarations.
Solution: Always define __ARGS() to include types. Turn a few functions
into ANSI style to find out if this causes problems for anyone.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 15 Jan 2016 21:30:05 +0100 |
parents | 1886f2863437 |
children | 1a5d34492798 |
comparison
equal
deleted
inserted
replaced
7597:3012eaddb6b2 | 7598:1a528724f9d6 |
---|---|
73 #if defined(HAVE_GETCWD) && !(defined(BAD_GETCWD) && defined(HAVE_GETWD)) | 73 #if defined(HAVE_GETCWD) && !(defined(BAD_GETCWD) && defined(HAVE_GETWD)) |
74 # define USE_GETCWD | 74 # define USE_GETCWD |
75 #endif | 75 #endif |
76 | 76 |
77 #ifndef __ARGS | 77 #ifndef __ARGS |
78 /* The AIX VisualAge cc compiler defines __EXTENDED__ instead of __STDC__ | 78 # define __ARGS(x) x |
79 * because it includes pre-ansi features. */ | |
80 # if defined(__STDC__) || defined(__GNUC__) || defined(__EXTENDED__) | |
81 # define __ARGS(x) x | |
82 # else | |
83 # define __ARGS(x) () | |
84 # endif | |
85 #endif | 79 #endif |
86 | 80 |
87 /* always use unlink() to remove files */ | 81 /* always use unlink() to remove files */ |
88 #ifndef PROTO | 82 #ifndef PROTO |
89 # ifdef VMS | 83 # ifdef VMS |
177 | 171 |
178 #define BASENAMELEN (MAXNAMLEN - 5) | 172 #define BASENAMELEN (MAXNAMLEN - 5) |
179 | 173 |
180 #ifdef HAVE_PWD_H | 174 #ifdef HAVE_PWD_H |
181 # include <pwd.h> | 175 # include <pwd.h> |
182 #endif | |
183 | |
184 #ifdef __COHERENT__ | |
185 # undef __ARGS | |
186 #endif | 176 #endif |
187 | 177 |
188 #if (defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT)) \ | 178 #if (defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT)) \ |
189 || (defined(HAVE_SYS_SYSINFO_H) && defined(HAVE_SYSINFO)) \ | 179 || (defined(HAVE_SYS_SYSINFO_H) && defined(HAVE_SYSINFO)) \ |
190 || defined(HAVE_SYSCTL) || defined(HAVE_SYSCONF) | 180 || defined(HAVE_SYSCTL) || defined(HAVE_SYSCONF) |