This patch uses header-guards and static-inline functions
instead of macro-wrappers inside stdio.h
Differential D4980
Avoid C++ namespace pollution from POSIX headers mmokhi on Jan 18 2016, 1:10 PM. Authored by Tags None Referenced Files
Details
This patch uses header-guards and static-inline functions instead of macro-wrappers inside stdio.h replace fileno macro-wrapper with an static-inline function
Diff Detail
Event Timeline
Comment Actions Updating D4980: Avoid C++ namespace pollution from POSIX headers Editing patches respecting comments
Comment Actions Updating D4980: Avoid C++ namespace pollution from POSIX headers Trying to solve infinite recursion for multithread call of fileno Comment Actions Updating D4980: Avoid C++ namespace pollution from POSIX headers Defined an extern wrapper for original fileno() to avoid infinite-recursion on mutithread cases This comment was removed by mmokhi. Comment Actions Organizing comments about __fileno_mt() inside stdio.h and fileno.c Comment Actions AFAIK, turning these macro-wrappers into functions, makes CC resolve symbols in compile/link-time. This means; unlike macros that not processed till be used by user, these functions (and symbols/functions inside'em) should be resolved at first and so every program that uses stdio.h should use -lc flag. Is this okay from your side ?
Comment Actions Updating D4980: Avoid C++ namespace pollution from POSIX headers manythings basically changed as i used symbol versioning. Comment Actions Updating D4980: Avoid C++ namespace pollution from POSIX headers This revision contains important changes.
Comment Actions Updating D4980: Avoid C++ namespace pollution from POSIX headers Changed getc macro-wrapper to static __inline function too. |