D-10 for GCC: was fcloseall() depricated

Need help with C, C++, perl, python, etc?

D-10 for GCC: was fcloseall() depricated

Postby mike acker » 2019-07-23 10:33

Code: Select all
~/Documents/1 Workareas/Workarea36$ gcc big_file_writer.c -o big_file_writer
big_file_writer.c: In function ‘main’:
big_file_writer.c:34:3: warning: implicit declaration of function ‘fcloseall’; did you mean ‘fclose’? [-Wimplicit-function-declaration]
   fcloseall();
   ^~~~~~~~~
   fclose


why is fcloseall()) rejected?
Viva la Resistencia
User avatar
mike acker
 
Posts: 128
Joined: 2017-06-28 21:23

Re: D-10 for GCC: was fcloseall() depricated

Postby ruwolf » 2019-07-23 11:00

It is not rejected, you have not declared it.
It is GNU C Library extension.
You probably should turn-on these extensions.
User avatar
ruwolf
 
Posts: 429
Joined: 2008-02-18 05:04
Location: Slovakia, Banovce nad Bebravou, Matice slovenskej 1260/4-7

Re: D-10 for GCC: was fcloseall() depricated

Postby mike acker » 2019-07-23 12:11

interesting

Code: Select all
#define _GNU_SOURCE /* include in order to use fcloseall() */


it would seem this was changed in D-10; I had not needed that declaration earlier
Viva la Resistencia
User avatar
mike acker
 
Posts: 128
Joined: 2017-06-28 21:23

Re: D-10 for GCC: was fcloseall() depricated

Postby stevepusser » 2019-07-23 17:07

Changed in the update to gcc-8 in Debian 10 would be a better way to say it. The same would also apply to any distro that updates to gcc-8, too.
MX Linux packager and developer
User avatar
stevepusser
 
Posts: 12013
Joined: 2009-10-06 05:53


Return to Programming

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable