From b5a9efcd9342681200280ef9f764b744d62b62ce Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 4 May 1999 12:24:18 +0000 Subject: Update. * elf/dl-load.c (expand_dynamic_string_token): Rewrite to loose st variable. --- FAQ.in | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'FAQ.in') diff --git a/FAQ.in b/FAQ.in index 0b950c81c5..6a841a07a3 100644 --- a/FAQ.in +++ b/FAQ.in @@ -1326,6 +1326,19 @@ Your program should check at runtime whether the function works, and implement a fallback. Note that Autoconf cannot detect unimplemented functions in other systems' C libraries, so you need to do this anyway. +?? My program segfaults when I call fclose() on the FILE* returned + from setmntent(). Is this a glibc bug? + +{GK} No. Don't do this. Use endmntent(), that's what it's for. + +In general, you should use the correct deallocation routine. For instance, +if you open a file using fopen(), you should deallocate the FILE * using +fclose(), not free(), even though the FILE * is also a pointer. + +In the case of setmntent(), it may appear to work in most cases, but it +won't always work. Unfortunately, for compatibility reasons, we can't +change the return type of setmntent() to something other than FILE *. + ? Miscellaneous -- cgit v1.2.3