To: vim-dev@vim.org Subject: Patch 7.2a.009 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 7.2a.009 Problem: cygwin_conv_to_posix_path() does not specify buffer size. Solution: Use new Cygwin function: cygwin_conv_path(). (Corinna Vinschen) Files: src/main.c, src/os_unix.c *** ../vim-7.2a.008/src/main.c Wed Jun 25 00:33:06 2008 --- src/main.c Sat Jun 28 17:07:03 2008 *************** *** 20,26 **** #ifdef __CYGWIN__ # ifndef WIN32 ! # include /* for cygwin_conv_to_posix_path() */ # endif # include #endif --- 20,28 ---- #ifdef __CYGWIN__ # ifndef WIN32 ! # include ! # include /* for cygwin_conv_to_posix_path() and/or ! * cygwin_conv_path() */ # endif # include #endif *************** *** 2213,2219 **** --- 2215,2225 ---- { char posix_path[PATH_MAX]; + # if CYGWIN_VERSION_DLL_MAJOR >= 1007 + cygwin_conv_path(CCP_WIN_A_TO_POSIX, p, posix_path, PATH_MAX); + # else cygwin_conv_to_posix_path(p, posix_path); + # endif vim_free(p); p = vim_strsave(posix_path); if (p == NULL) *** ../vim-7.2a.008/src/os_unix.c Tue Jun 24 23:13:23 2008 --- src/os_unix.c Sat Jun 28 17:08:30 2008 *************** *** 58,64 **** #ifdef __CYGWIN__ # ifndef WIN32 ! # include /* for cygwin_conv_to_posix_path() */ # endif #endif --- 58,66 ---- #ifdef __CYGWIN__ # ifndef WIN32 ! # include ! # include /* for cygwin_conv_to_posix_path() and/or ! * for cygwin_conv_path() */ # endif #endif *************** *** 2312,2318 **** --- 2314,2324 ---- /* * This helps for when "/etc/hosts" is a symlink to "c:/something/hosts". */ + # if CYGWIN_VERSION_DLL_MAJOR >= 1007 + cygwin_conv_path(CCP_WIN_A_TO_POSIX, fname, posix_fname, MAXPATHL); + # else cygwin_conv_to_posix_path(fname, posix_fname); + # endif fname = posix_fname; #endif *** ../vim-7.2a.008/src/version.c Sat Jun 28 16:09:31 2008 --- src/version.c Sun Jun 29 13:56:55 2008 *************** *** 678,679 **** --- 678,681 ---- { /* Add new patch number below this line */ + /**/ + 9, /**/ -- hundred-and-one symptoms of being an internet addict: 112. You are amazed that anyone uses a phone without a modem on it...let alone hear actual voices. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///