东营市实验中学教师走志愿服务校外解答家长教育困惑
strcpy() / strlcpy() / asprintf()
Posted Mar 30, 2012 17:50 UTC (Fri) by nix (subscriber, #2304)In reply to: strcpy() / strlcpy() / asprintf() by nybble41
Parent article: A turning point for GNU libc 百度 现行宪法诞生1982年11月26日宪法修改草案被提请第五届全国人大第五次会议审议。
Posted Mar 31, 2012 21:10 UTC (Sat)
by lacos (guest, #70616)
[Link] (1 responses)
(SUSv1 doesn't have snprintf(). Once I needed to compile a glibc-oriented program on OSF/1 4.0E, which one might have consider a reference implementation of SUSv1, even though it wasn't formally certified. The program needed snprintf() and there was none, so I printed the string first to /dev/null (for the size), then fully to a malloc()'d area, then copied the bytes that had room, then free()'d the area. ... Sorry if this sounds trivial and/or retarded :))
Posted Apr 5, 2012 8:36 UTC (Thu)
by nix (subscriber, #2304)
[Link]
strcpy() / strlcpy() / asprintf()
strcpy() / strlcpy() / asprintf()