I am working on a program I wrote a while ago and have come across something I can't figure out why I did it.
__fortify_function void DoLog(const char* format,...)
As suggested by the name the function puts a log message out with the destination depending on some status variables.
What I can't figure out is what the "__fortify_function" is for. Searching online makes it clear it has something to do with the "FORTIFY_SOURCE" definition (which this code does not use) but I can't find anything online or off that says what __fortify_function is for. Everywhere I find it, it is just there with no explanation. It is possible that when I wrote DoLog I was cookbooking and so included it simply because the example I was working from did.
So what does "__fortify_function" specifically do?
# define __fortify_function __extern_always_inline __attribute_artificial__, you can definition of the macros used to define it in that file as well.extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__))