[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fuse-devel
Subject:    Re: [fuse-devel] question about pointers in C
From:       Jan-Benedict Glaw <jbglaw () lug-owl ! de>
Date:       2009-12-29 15:45:30
Message-ID: 20091229154530.GG5758 () lug-owl ! de
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Mon, 2009-12-28 15:52:25 +0100, Didier GARCIN <dg.recrutement31@gmail.com> wrote:
> Ordinary, man 3 basename gives a more straightforward method :
> 
> #define _GNU_SOURCE
> #include <string.h>

That won't guarantee that you get what you asked for. Think about
compiling this code with eg. a BSD libc.

> But, I don't know why (it's too old in my mind) but I decided to use the 
> first method.
> Perhaps because this last method (with #define _GNU_SOURCE) didn't work with 
> my soft. Indeed, I can't see any reference to _GNU_SOURCE in string.h.
> Mystery ???

No, design.  "_GNU_SOURCE" enables a number of features, which in turn
activate more defines. This is all hidden within features.h in a GNU
libc.

However, my hint is: don't rely on GNU functions unless you're forced
to. Don't get me wrong, I like those. But they may hinder portability.
Unless, of course, you ship a complete GNU libc etc. to whereever your
software should run.  But "ordinary" software should just run on any
system offering a POSIX or ANSI system interface.

MfG, JBG

-- 
      Jan-Benedict Glaw      jbglaw@lug-owl.de              +49-172-7608481
Signature of:          GDB has a 'break' feature; why doesn't it have 'fix' too?
the second  :

["signature.asc" (application/pgp-signature)]

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 

_______________________________________________
fuse-devel mailing list
fuse-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fuse-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic