On Wed, May 09, 2012 at 10:20:44AM +0200, Josef Reidinger wrote:
On Tue, 8 May 2012 17:29:24 +0200 Arvin Schnell
wrote: Hi,
I noticed that YaST prints garbage when the logfile cannot be opened. The problem is that strerror_r may leave buf untouched so you have to print the returned pointer (when using the GNU version of strerror_r).
ciao Arvin
Hi,
patch looks fine. Just I am curious if there is agreement that yast code is GNU specific. If we want more portable code ( for whatever reason ) maybe it will be better to just undef _GNU_SOURCE there.
Well, currently several GNU specific functions are used
(e.g. asprintf, basename, canonicalize_file_name). Apart from
that g++ already defines _GNU_SOURCE so making sure that no GNU
specific functions are used is not easy or maybe even impossible
(without another compiler).
Also see:
http://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.predefined
ciao Arvin
--
Arvin Schnell,