tcpdump mailing list archives
Re: Multifile patch
From: "David Laight" <David.Laight () ACULAB COM>
Date: Tue, 4 Sep 2012 11:11:03 +0100
On Sep 3, 2012, at 7:13 PM, Michael Richardson wrote:Wesley, is fopen("/dev/stdin") really the most portal(Presumably "portable".)way to get a reference to stein?Definitely not - it will probably work on most modern UN*Xes (Linux, *BSD/OS X, and Solaris; I don't know about HP-UX or AIX), but not on Windows, so it won't work in WinDump.I'd have thought that doing: VFile=stdin; was the best way?Yes.
I seem to be missing half these mails .... On windows you can't pass 'FILE *' into shared libraries, they are likely to have their own copies of the stdio libraries - with different FILE structures. (eg if one part is compiled with debug enabled). Probably the most portable way is using fdopen(0, ...) that will work in windows - fileno(stdin) is still 0. David _______________________________________________ tcpdump-workers mailing list tcpdump-workers () lists tcpdump org https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers
Current thread:
- Multifile patch Wesley Shields (Aug 19)
- Re: Multifile patch Michael Richardson (Aug 21)
- Re: Multifile patch Wesley Shields (Aug 21)
- Re: Multifile patch Michael Richardson (Aug 23)
- Re: Multifile patch Wesley Shields (Aug 23)
- Re: Multifile patch Wesley Shields (Aug 21)
- Re: Multifile patch Michael Richardson (Aug 21)
- Re: Multifile patch Michael Richardson (Sep 03)
- Re: Multifile patch Guy Harris (Sep 04)
- Re: Multifile patch David Laight (Sep 04)
- Re: Multifile patch Guy Harris (Sep 04)
- Re: Multifile patch David Laight (Sep 05)
- Re: Multifile patch Guy Harris (Sep 04)
- Re: Multifile patch Wesley Shields (Sep 13)