| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
| :list-unsubscribe:list-subscribe:list-archive:list-post | |
| :list-help:sender:to:from:subject:date:message-id:references | |
| :mime-version:content-type:content-transfer-encoding; q=dns; s= | |
| default; b=JzeHRv/Wv5KmbBrox4LP/j81Vy0o4UQrRG5+PlPEpUQefDcjK/U8W | |
| ysk7lM/aG/ioOUo3rIBg0Tnb7FqstRU3ZF4A8zIG5fIRuz5SPqLR7c0AU064rJR1 | |
| n+NJDSqhiDyCj1epIf9EnzhHiq0kzZIGsUGs6Ahb0O9OQmov+QuPoY= | |
| DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
| :list-unsubscribe:list-subscribe:list-archive:list-post | |
| :list-help:sender:to:from:subject:date:message-id:references | |
| :mime-version:content-type:content-transfer-encoding; s=default; | |
| bh=Khdw+9trkp1OQVypkz9unN3BRGY=; b=A6vK+LcY7Il8eWRuCNgS7epJAtOX | |
| QNfshOupxG2MNcWXccTzhkSUwG/x1Hc6NWTBn5xzfFxyGhLoVJXUupMDdrH9Yfg/ | |
| 1C9q1v6tX4X9jC1zVYuYxJL6NOkC4TDgLoQlPfj87AryOWrDME//pCOM5Boy+Hlu | |
| 7TeciwWubUQXXzA= | |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| X-Spam-SWARE-Status: | No, score=-3.8 required=5.0 tests=BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 |
| To: | cygwin AT cygwin DOT com |
| From: | Andrew Schulman <schulman DOT andrew AT epamail DOT epa DOT gov> |
| Subject: | Re: libargp: argp_program_version does not work |
| Date: | Fri, 12 Jul 2013 10:51:51 -0400 |
| Lines: | 34 |
| Message-ID: | <tq50u89pa1s7us0cff5rnu8k5ocumac510@4ax.com> |
| References: | <000001ce7e08$2b866830$82933890$%fedin AT samsung DOT com> <u4ett8due4p6h9ku1iumscvulp0g688tgk AT 4ax DOT com> <4q4ut8had25hqmo8b0752i8asuv6ism2qh AT 4ax DOT com> <002901ce7f0a$9da99420$d8fcbc60$%fedin AT samsung DOT com> |
| Mime-Version: | 1.0 |
| X-Archive: | encrypt |
> Hello!
>
> > int main (int argc, char **argv)
> > {
> > argp_program_version = version;
> > argp_program_bug_address = bug_address;
> >
> > argp_parse (&argp, argc, argv, 0, 0, 0); }
> >
> > /*** End modified argp example #2 ***/
> >
> > If you compile the above version, you'll see that the --version option
> > and bug tracker text are available.
> >
> > I'm sure this problem is familiar to developers and users of shared
> > libraries, but I had forgotten it. I'll add a note to the Cygwin
> > README file, to help all of us remember it next time.
>
> Yes, i know this. But looks like nobody actually follows your way, because
> under Linux simple redefinition perfectly works.
> Of course we could fix every program, but i have an idea how to make the
> original Linux code working:
> 1. Inside DLL we should rename this variables somehow
> 2. Inside libargp.a.dll we should have a constructor function (with
> __attribute__((constructor))) which assigns variables inside DLL with
> contents of argp_program_version and argp_program_bug_address.
> 3. Also inside libargp.a.dll we should have default definitions of these
> variables with NULL contents.
>
> This way code modification would not be required any more.
> I'll try to implement this when have more time.
Okay, well I agree that this sounds like a good solution. For now you have
a workaround, and I'll be glad to consider a patch if you submit one.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |