comparison src/os_unix.c @ 10328:299f1669c20e v8.0.0059

commit https://github.com/vim/vim/commit/de5e2c219b99895445fb75ae3541ee69282a5846 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Nov 4 20:35:31 2016 +0100 patch 8.0.0059 Problem: Vim does not build on VMS systems. Solution: Various changes for VMS. (Zoltan Arpadffy)
author Christian Brabandt <cb@256bit.org>
date Fri, 04 Nov 2016 20:45:04 +0100
parents 6ab770e97152
children 72d92c31b9f7
comparison
equal deleted inserted replaced
10327:7140bc579558 10328:299f1669c20e
499 } 499 }
500 500
501 /* no character available */ 501 /* no character available */
502 #if !(defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)) 502 #if !(defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H))
503 /* estimate the elapsed time */ 503 /* estimate the elapsed time */
504 elapsed += wait_time; 504 elapsed_time += wait_time;
505 #endif 505 #endif
506 506
507 if (do_resize /* interrupted by SIGWINCH signal */ 507 if (do_resize /* interrupted by SIGWINCH signal */
508 #ifdef FEAT_CLIENTSERVER 508 #ifdef FEAT_CLIENTSERVER
509 || server_waiting() 509 || server_waiting()
2642 struct stat st; 2642 struct stat st;
2643 char_u *slash, *tail; 2643 char_u *slash, *tail;
2644 DIR *dirp; 2644 DIR *dirp;
2645 struct dirent *dp; 2645 struct dirent *dp;
2646 2646
2647 if (lstat((char *)name, &st) >= 0) 2647 if (mch_lstat((char *)name, &st) >= 0)
2648 { 2648 {
2649 /* Open the directory where the file is located. */ 2649 /* Open the directory where the file is located. */
2650 slash = vim_strrchr(name, '/'); 2650 slash = vim_strrchr(name, '/');
2651 if (slash == NULL) 2651 if (slash == NULL)
2652 { 2652 {
2675 2675
2676 /* Verify the inode is equal. */ 2676 /* Verify the inode is equal. */
2677 vim_strncpy(newname, name, MAXPATHL); 2677 vim_strncpy(newname, name, MAXPATHL);
2678 vim_strncpy(newname + (tail - name), (char_u *)dp->d_name, 2678 vim_strncpy(newname + (tail - name), (char_u *)dp->d_name,
2679 MAXPATHL - (tail - name)); 2679 MAXPATHL - (tail - name));
2680 if (lstat((char *)newname, &st2) >= 0 2680 if (mch_lstat((char *)newname, &st2) >= 0
2681 && st.st_ino == st2.st_ino 2681 && st.st_ino == st2.st_ino
2682 && st.st_dev == st2.st_dev) 2682 && st.st_dev == st2.st_dev)
2683 { 2683 {
2684 STRCPY(tail, dp->d_name); 2684 STRCPY(tail, dp->d_name);
2685 break; 2685 break;
3038 { 3038 {
3039 struct stat statb; 3039 struct stat statb;
3040 3040
3041 if (*name == NUL) /* Some stat()s don't flag "" as an error. */ 3041 if (*name == NUL) /* Some stat()s don't flag "" as an error. */
3042 return FALSE; 3042 return FALSE;
3043 if (lstat((char *)name, &statb)) 3043 if (mch_lstat((char *)name, &statb))
3044 return FALSE; 3044 return FALSE;
3045 #ifdef _POSIX_SOURCE 3045 #ifdef _POSIX_SOURCE
3046 return (S_ISDIR(statb.st_mode) ? TRUE : FALSE); 3046 return (S_ISDIR(statb.st_mode) ? TRUE : FALSE);
3047 #else 3047 #else
3048 return ((statb.st_mode & S_IFMT) == S_IFDIR ? TRUE : FALSE); 3048 return ((statb.st_mode & S_IFMT) == S_IFDIR ? TRUE : FALSE);
4096 char *ofn = NULL; 4096 char *ofn = NULL;
4097 #endif 4097 #endif
4098 int tmode = cur_tmode; 4098 int tmode = cur_tmode;
4099 #ifdef USE_SYSTEM /* use system() to start the shell: simple but slow */ 4099 #ifdef USE_SYSTEM /* use system() to start the shell: simple but slow */
4100 char_u *newcmd; /* only needed for unix */ 4100 char_u *newcmd; /* only needed for unix */
4101 int x;
4101 4102
4102 out_flush(); 4103 out_flush();
4103 4104
4104 if (options & SHELL_COOKED) 4105 if (options & SHELL_COOKED)
4105 settmode(TMODE_COOK); /* set to normal mode */ 4106 settmode(TMODE_COOK); /* set to normal mode */