tcpdump mailing list archives
Re: snprintf in libpcap
From: Guy Harris via tcpdump-workers <tcpdump-workers () lists tcpdump org>
Date: Mon, 2 Mar 2020 17:08:23 -0500 (EST)
--- Begin Message --- From: Guy Harris <gharris () sonic net>
Date: Mon, 2 Mar 2020 14:09:00 -0800
On Mar 2, 2020, at 1:51 PM, Guy Harris via tcpdump-workers <tcpdump-workers () lists tcpdump org> wrote:On Mar 2, 2020, at 1:22 PM, Michael Richardson via tcpdump-workers <tcpdump-workers () lists tcpdump org> wrote:Back in 2016, we note in the CHANGES: Replace sprintf() with pcap_snprintf(). but, we have no prototype for this, and apparently no definition, and we use snprintf() everywhere. I'm trying to merge Ray's changes which are rebased into pull request #914. I think that we just use "snprintf()" now.In the master branch, we require versions of Visual Studio that support a C99-compatible snprintf(), and we also require C99-compatible snprintf() support on UN*Xes. Earlier versions 1) had pcap_snprintf() and 2) either declared it and provided it, or just #defined pcap_snprintf to be snprintf.Or are you thinking of asprintf()? I didn't *think* that was available on Windows, so we would supply our own implementation, but AppVeyor appears to be finding it in recent builds.
--- End Message ---
_______________________________________________ tcpdump-workers mailing list tcpdump-workers () lists tcpdump org https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers
Current thread:
- snprintf in libpcap Michael Richardson via tcpdump-workers (Mar 02)
- Re: snprintf in libpcap Guy Harris via tcpdump-workers (Mar 02)
- Re: snprintf in libpcap Guy Harris via tcpdump-workers (Mar 02)
- Re: snprintf in libpcap Guy Harris via tcpdump-workers (Mar 02)
- Re: snprintf in libpcap Guy Harris via tcpdump-workers (Mar 02)
- Re: snprintf in libpcap Guy Harris via tcpdump-workers (Mar 02)