[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libltdl and cygwin 1.7.0
From: |
Bob Friesenhahn |
Subject: |
Re: libltdl and cygwin 1.7.0 |
Date: |
Wed, 30 Apr 2008 12:20:14 -0500 (CDT) |
On Wed, 30 Apr 2008, Eric Blake wrote:
Cygwin 1.7.0 will change the size of MAX_PATH in its headers, but the old
cygwin_conv_to_* API silently suffers from buffer overrun if more than 256
bytes occur in the conversion. As a result, cygwin developers wisely
deprecated the old API when adding the new cygwin_path_conv, and compilation
now issues a warning (which in turn cripples -Werror builds):
libltdl/loaders/loadlibrary.c: In function `vm_open':
libltdl/loaders/loadlibrary.c:147: warning: `cygwin_conv_to_full_win32_path' is
deprecated (declared at /usr/include/sys/cygwin.h:52)
make[2]: *** [libltdl/loaders/loadlibrary.lo] Error 1
OK to apply?
This looks good to apply to me except for the minor nit that the
bracing indentation within the HAVE_DECL_CYGWIN_CONV_PATH is wrong
(and should be corrected).
-#if defined(__CYGWIN__)
+#if HAVE_DECL_CYGWIN_CONV_PATH
+ if (cygwin_conv_path (CCP_POSIX_TO_WIN_A, filename, wpath, MAX_PATH))
+ {
+ LT__SETERROR (CANNOT_OPEN);
+ return 0;
+ }
+ len = 0;
Bob
======================================
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/