[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: building from urlwrite gives undefined reference to `_errno()' (MinG
From: |
Tatsuro MATSUOKA |
Subject: |
Re: building from urlwrite gives undefined reference to `_errno()' (MinGW build 3.3.50+) |
Date: |
Tue, 12 Jan 2010 05:56:06 +0900 (JST) |
Hello
With your patch, the link error for urlwrite was disappeared.
Thanks!
Tatsuro
--- "John W. Eaton" wrote:
> On 11-Jan-2010, Tatsuro MATSUOKA wrote:
>
> | Hello
> | If
> |
> | std::string lasterror (void) const
> | {
> | CURLcode errno;
> |
> | curl_easy_getinfo (rep->handle(), CURLINFO_OS_ERRNO, &errno);
> |
> | return std::string (curl_easy_strerror (errno));
> | }
> |
> | in urlwrite.cc were modified as
> |
> | std::string lasterror (void) const
> | {
> | int errno;
> |
> | curl_easy_getinfo (rep->handle(), CURLINFO_OS_ERRNO, &errno);
> |
> | return std::string (curl_easy_strerror ((CURLcode)errno));
> | }
> |
> | The link errors below were disappeared.
> |
> |
> |
>
DLD-FUNCTIONS/.libs/DLD_FUNCTIONS_urlwrite_laurlwrite.o:urlwrite.cc:(.text$_ZNK11curl_handle9lasterrorEv[curl_handle::lasterror()
> |
> | const]+0x9): undefined reference to `_errno()'
> |
>
DLD-FUNCTIONS/.libs/DLD_FUNCTIONS_urlwrite_laurlwrite.o:urlwrite.cc:(.text$_ZNK11curl_handle9lasterrorEv[curl_handle::lasterror()
> |
> | const]+0x2c): undefined reference to `_errno()'
> |
> |
>
http://old.nabble.com/building-from-urlwrite-gives-undefined-reference-to-%60_errno()'-(MinGW-build-3.3.50%2B)-to27094133.html
> |
> | However, the modification is perhaps a not proper modification. Can anyone
> give me suggestions
> or
> | advises?
>
> Does the attached change work for you? If so, I'll apply it.
>
> Thanks,
>
> jwe
>
> > diff --git a/src/ChangeLog b/src/ChangeLog
> --- a/src/ChangeLog
> +++ b/src/ChangeLog
> @@ -1,3 +1,8 @@
> +2010-01-11 John W. Eaton <address@hidden>
> +
> + * DLD-FUNCTIONS/urlwrite.cc (curl_handle::lasterror):
> + Avoid using errno as a local variable name.
> +
> 2010-01-11 Tatsuro MATSUOKA <address@hidden>
>
> * Makefile.am (OCTINTERP_LINK_DEPS): Include FT2_LDFLAGS and
> diff --git a/src/DLD-FUNCTIONS/urlwrite.cc b/src/DLD-FUNCTIONS/urlwrite.cc
> --- a/src/DLD-FUNCTIONS/urlwrite.cc
> +++ b/src/DLD-FUNCTIONS/urlwrite.cc
> @@ -251,11 +251,11 @@
>
> std::string lasterror (void) const
> {
> - CURLcode errno;
> + CURLcode errnum;
>
> - curl_easy_getinfo (rep->handle(), CURLINFO_OS_ERRNO, &errno);
> + curl_easy_getinfo (rep->handle(), CURLINFO_OS_ERRNO, &errnum);
>
> - return std::string (curl_easy_strerror (errno));
> + return std::string (curl_easy_strerror (errnum));
> }
>
> void set_ostream (std::ostream& os) const
>
--------------------------------------
Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
http://pr.mail.yahoo.co.jp/ie8/
- building from urlwrite gives undefined reference to `_errno()' (MinGW build 3.3.50+), Tatsuro MATSUOKA, 2010/01/09
- building from urlwrite gives undefined reference to `_errno()' (MinGW build 3.3.50+), Tatsuro MATSUOKA, 2010/01/09
- Re: building from urlwrite gives undefined reference to `_errno()' (MinGW build 3.3.50+), Benjamin Lindner, 2010/01/10
- Re: building from urlwrite gives undefined reference to `_errno()' (MinGW build 3.3.50+), Tatsuro MATSUOKA, 2010/01/10
- Re: building from urlwrite gives undefined reference to `_errno()' (MinGW build 3.3.50+), Tatsuro MATSUOKA, 2010/01/10
- Re: building from urlwrite gives undefined reference to `_errno()' (MinGW build 3.3.50+), Tatsuro MATSUOKA, 2010/01/10
- Re: building from urlwrite gives undefined reference to `_errno()' (MinGW build 3.3.50+), Tatsuro MATSUOKA, 2010/01/11
- Re: building from urlwrite gives undefined reference to `_errno()' (MinGW build 3.3.50+), John W. Eaton, 2010/01/11
- Re: building from urlwrite gives undefined reference to `_errno()' (MinGW build 3.3.50+),
Tatsuro MATSUOKA <=
- Re: building from urlwrite gives undefined reference to `_errno()' (MinGW build 3.3.50+), John W. Eaton, 2010/01/11