0bb1721
To: vim-dev@vim.org
0bb1721
Subject: Patch 7.0.026
0bb1721
Fcc: outbox
0bb1721
From: Bram Moolenaar <Bram@moolenaar.net>
0bb1721
Mime-Version: 1.0
0bb1721
Content-Type: text/plain; charset=ISO-8859-1
0bb1721
Content-Transfer-Encoding: 8bit
0bb1721
------------
0bb1721
0bb1721
Patch 7.0.026
0bb1721
Problem:    Using libcall() may show an old error.
0bb1721
Solution:   Invoke dlerror() to clear a previous error. (Yukihiro Nakadaira)
0bb1721
Files:      src/os_unix.c
0bb1721
0bb1721
0bb1721
*** ../vim-7.0.025/src/os_unix.c	Wed May  3 00:01:30 2006
0bb1721
--- src/os_unix.c	Sat Jun 17 21:00:14 2006
0bb1721
***************
0bb1721
*** 5757,5764 ****
0bb1721
      int		retval_int = 0;
0bb1721
      int		success = FALSE;
0bb1721
  
0bb1721
!     /* Get a handle to the DLL module. */
0bb1721
  # if defined(USE_DLOPEN)
0bb1721
      hinstLib = dlopen((char *)libname, RTLD_LAZY
0bb1721
  #  ifdef RTLD_LOCAL
0bb1721
  	    | RTLD_LOCAL
0bb1721
--- 5758,5770 ----
0bb1721
      int		retval_int = 0;
0bb1721
      int		success = FALSE;
0bb1721
  
0bb1721
!     /*
0bb1721
!      * Get a handle to the DLL module.
0bb1721
!      */
0bb1721
  # if defined(USE_DLOPEN)
0bb1721
+     /* First clear any error, it's not cleared by the dlopen() call. */
0bb1721
+     (void)dlerror();
0bb1721
+ 
0bb1721
      hinstLib = dlopen((char *)libname, RTLD_LAZY
0bb1721
  #  ifdef RTLD_LOCAL
0bb1721
  	    | RTLD_LOCAL
0bb1721
*** ../vim-7.0.025/src/version.c	Thu Jun 22 18:02:06 2006
0bb1721
--- src/version.c	Thu Jun 22 18:05:10 2006
0bb1721
***************
0bb1721
*** 668,669 ****
0bb1721
--- 668,671 ----
0bb1721
  {   /* Add new patch number below this line */
0bb1721
+ /**/
0bb1721
+     26,
0bb1721
  /**/
0bb1721
0bb1721
-- 
0bb1721
BRIDGEKEEPER: What is your favorite editor?
0bb1721
GAWAIN:       Emacs ...  No, Viiiiiiiiiiimmmmmmm!
0bb1721
           "Monty Python and the Holy editor wars" PYTHON (MONTY) SOFTWARE LTD
0bb1721
0bb1721
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
0bb1721
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
0bb1721
\\\        download, build and distribute -- http://www.A-A-P.org        ///
0bb1721
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///