comparison src/vim.h @ 14509:80f715651c4c v8.1.0268

patch 8.1.0268: file type checking has too many #ifdef commit https://github.com/vim/vim/commit/d569bb029983cff947dce704e6f830276204c13f Author: Bram Moolenaar <Bram@vim.org> Date: Sat Aug 11 13:57:20 2018 +0200 patch 8.1.0268: file type checking has too many #ifdef Problem: File type checking has too many #ifdef. Solution: Always define the S_IF macros. (Ken Takata, closes https://github.com/vim/vim/issues/3306)
author Christian Brabandt <cb@256bit.org>
date Sat, 11 Aug 2018 14:00:05 +0200
parents 4f5a15867544
children c8f07e8b273e
comparison
equal deleted inserted replaced
14508:7336a81d18c4 14509:80f715651c4c
2288 # endif 2288 # endif
2289 # endif 2289 # endif
2290 2290
2291 #endif 2291 #endif
2292 2292
2293 /* ISSYMLINK(mode) tests if a file is a symbolic link. */
2294 #if (defined(S_IFMT) && defined(S_IFLNK)) || defined(S_ISLNK)
2295 # define HAVE_ISSYMLINK
2296 # if defined(S_IFMT) && defined(S_IFLNK)
2297 # define ISSYMLINK(mode) (((mode) & S_IFMT) == S_IFLNK)
2298 # else
2299 # define ISSYMLINK(mode) S_ISLNK(mode)
2300 # endif
2301 #endif
2302 2293
2303 #define SIGN_BYTE 1 /* byte value used where sign is displayed; 2294 #define SIGN_BYTE 1 /* byte value used where sign is displayed;
2304 attribute value is sign type */ 2295 attribute value is sign type */
2305 2296
2306 #ifdef FEAT_NETBEANS_INTG 2297 #ifdef FEAT_NETBEANS_INTG
2515 #define FNE_INCL_BR 1 /* include [] in name */ 2506 #define FNE_INCL_BR 1 /* include [] in name */
2516 #define FNE_CHECK_START 2 /* check name starts with valid character */ 2507 #define FNE_CHECK_START 2 /* check name starts with valid character */
2517 2508
2518 /* BSD is supposed to cover FreeBSD and similar systems. */ 2509 /* BSD is supposed to cover FreeBSD and similar systems. */
2519 #if (defined(SUN_SYSTEM) || defined(BSD) || defined(__FreeBSD_kernel__)) \ 2510 #if (defined(SUN_SYSTEM) || defined(BSD) || defined(__FreeBSD_kernel__)) \
2520 && defined(S_ISCHR) 2511 && (defined(S_ISCHR) || defined(S_IFCHR))
2521 # define OPEN_CHR_FILES 2512 # define OPEN_CHR_FILES
2513 #endif
2514
2515 /* stat macros */
2516 #ifndef S_ISDIR
2517 # ifdef S_IFDIR
2518 # define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
2519 # else
2520 # define S_ISDIR(m) 0
2521 # endif
2522 #endif
2523 #ifndef S_ISREG
2524 # ifdef S_IFREG
2525 # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
2526 # else
2527 # define S_ISREG(m) 0
2528 # endif
2529 #endif
2530 #ifndef S_ISBLK
2531 # ifdef S_IFBLK
2532 # define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
2533 # else
2534 # define S_ISBLK(m) 0
2535 # endif
2536 #endif
2537 #ifndef S_ISSOCK
2538 # ifdef S_IFSOCK
2539 # define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
2540 # else
2541 # define S_ISSOCK(m) 0
2542 # endif
2543 #endif
2544 #ifndef S_ISFIFO
2545 # ifdef S_IFIFO
2546 # define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
2547 # else
2548 # define S_ISFIFO(m) 0
2549 # endif
2550 #endif
2551 #ifndef S_ISCHR
2552 # ifdef S_IFCHR
2553 # define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
2554 # else
2555 # define S_ISCHR(m) 0
2556 # endif
2557 #endif
2558 #ifndef S_ISLNK
2559 # ifdef S_IFLNK
2560 # define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
2561 # else
2562 # define S_ISLNK(m) 0
2563 # endif
2522 #endif 2564 #endif
2523 2565
2524 #if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H) 2566 #if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
2525 # define ELAPSED_TIMEVAL 2567 # define ELAPSED_TIMEVAL
2526 # define ELAPSED_INIT(v) gettimeofday(&v, NULL) 2568 # define ELAPSED_INIT(v) gettimeofday(&v, NULL)