Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Oct 2012 18:44:45 +0200
From:      Polytropon <freebsd@edvax.de>
To:        s m <sam.gh1986@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: ipfw headers
Message-ID:  <20121023184445.5f6c0e8a.freebsd@edvax.de>
In-Reply-To: <CAA_1SgGUXf-6QP2-5vsCjRDUhBoC18M7T-6UQ%2BFv5HE2u5LK5w@mail.gmail.com>
References:  <CAA_1SgHb8NTaAoOh3kox5CtNUF9h__cUWtUr_7ygQAvNWy-EFg@mail.gmail.com> <20121023155211.9785bae4.freebsd@edvax.de> <CAA_1SgGUXf-6QP2-5vsCjRDUhBoC18M7T-6UQ%2BFv5HE2u5LK5w@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 23 Oct 2012 17:35:45 +0330, s m wrote:
> thanks for your quick reply. you know, i want to add studio.h header but
> the below error occurs: "no such file or directory". i am sure that
> studio.h locates in usr/src/include but that error occured. if i write the
> full path of studio.h in ipfw file and then compile it, another error
> happened. do you know how i could fix it? thanks

The normal inclusion

	#include <stdio.h>

should be sufficient. However, if you make your change to
ipfw in the /usr/src tree, calling "make" might default to
a different path for obtaining headers, i. e. use them from
within the src/ tree.

The system defaults to several paths, in one of them stdio.h
should be defined no matter what build command you use.

/usr/include/stdio.h is the default file. /usr/include will
be automatically used unless you change a compiler option
(-I).

/usr/src/include/stdio.h the file used when building stuff
from source. This would be the case (if I remember correctly)
when you call "make" from /usr/src/sbin/ipfw directly. As
ipfw (unaltered) also includes headers "next to" stdio.h,
it shouldn't be a problem. You can compare this to other
#include preprocessor commands found in ipfw's main.c.

Final note: If you did actually use the name "studio.h" - that
is a typo. There is no "u" in "standard I/O". :-)





-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121023184445.5f6c0e8a.freebsd>