Re: [gentoo-user] [OT] where is PID_MAX_DEFAULT ?

2007-01-04 Thread Daniel Iliev
Iain Buchanan wrote:
 --snip--

 $ slocate threads.h
 /usr/include/X11/Xthreads.h
 /usr/include/libxml2/libxml/threads.h
 /usr/include/dbus-1.0/dbus/dbus-threads.h
 /usr/include/stlport/stl/_threads.h
 /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include/g++-v3/bits/stl_threads.h
 /usr/lib/klibc/include/linux/threads.h
 /usr/share/doc/libvorbis-1.1.2/txt/doc/vorbisfile/threads.html
 /usr/src/linux-2.6.18-suspend2/include/linux/threads.h
 /usr/src/linux-2.6.19-suspend2-r1/include/linux/threads.h

 but I don't want to -I any of those!

   
My mistake - I should paste the whole output but only:

/usr/include/linux/threads.h and 
/usr/src/linux-2.6.18-suspend2/include/linux/threads.h

 what version do you have?
 thanks,
   

 sys-kernel/linux-headers-2.6.11-r2 on stable amd64


-- 
Best regards,
Daniel


-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] [OT] where is PID_MAX_DEFAULT ?

2007-01-04 Thread Richard Fish

On 1/3/07, Iain Buchanan [EMAIL PROTECTED] wrote:

Hi all,

I was just trying to compile one of my programs that includes
linux/threads.h for the #define PID_MAX_DEFAULT, however, threads.h
isn't there anymore!


Hmm, on linux the maximum PID can be changed dynamically at run time.
Wouldn't it be better to change this to read /proc/sys/kernel/pid_max?


I've just upgraded linux-headers to 2.6.19 - is this the problem?


It seems so.  From kernel-2.eclass:

   # 2.6.18 introduces headers_install which means we dont need any
   # of this crap anymore :D
   if kernel_is ge 2 6 18 ; then
   env_setup_xmakeopts
   emake headers_install
INSTALL_HDR_PATH=${D}/${ddir}/.. ${xmakeopts} || die

In other words, for versions previous to 2.6.18, (almost) all headers
in the tarball were installed.  For 2.6.18 and later, the makefile in
the tarball defines what gets installed.

If you truly need this header, make a private copy for your source
directory, or just define PID_MAX_DEFAULT yourself.  But as I
mentioned above, it can be changed at run-time, so relying on this to
be constant could be dangerous.

-Richard
--
gentoo-user@gentoo.org mailing list



[gentoo-user] [OT] where is PID_MAX_DEFAULT ?

2007-01-03 Thread Iain Buchanan
Hi all,

I was just trying to compile one of my programs that includes
linux/threads.h for the #define PID_MAX_DEFAULT, however, threads.h
isn't there anymore!

I've just upgraded linux-headers to 2.6.19 - is this the problem?  I
can't find a replacement for PID_MAX_DEFAULT anywhere in the header
files - has the name changed?

google was also unhelpful AFAICT.  I'd appreciate help!

thanks,
-- 
Iain Buchanan iaindb at netspace dot net dot au

Nothing cures insomnia like the realization that it's time to get up.

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] [OT] where is PID_MAX_DEFAULT ?

2007-01-03 Thread Karl Chen

I could find thread.h file there!
Maybe your tar ball of kernel has been damaged!
you could download it again and have a try !


On 1/4/07, Iain Buchanan [EMAIL PROTECTED] wrote:


Hi all,

I was just trying to compile one of my programs that includes
linux/threads.h for the #define PID_MAX_DEFAULT, however, threads.h
isn't there anymore!

I've just upgraded linux-headers to 2.6.19 - is this the problem?  I
can't find a replacement for PID_MAX_DEFAULT anywhere in the header
files - has the name changed?

google was also unhelpful AFAICT.  I'd appreciate help!

thanks,
--
Iain Buchanan iaindb at netspace dot net dot au

Nothing cures insomnia like the realization that it's time to get up.

--
gentoo-user@gentoo.org mailing list




Re: [gentoo-user] [OT] where is PID_MAX_DEFAULT ?

2007-01-03 Thread Daniel Iliev
Iain Buchanan wrote:
 Hi all,

 I was just trying to compile one of my programs that includes
 linux/threads.h for the #define PID_MAX_DEFAULT, however, threads.h
 isn't there anymore!

 I've just upgraded linux-headers to 2.6.19 - is this the problem?  I
 can't find a replacement for PID_MAX_DEFAULT anywhere in the header
 files - has the name changed?

 google was also unhelpful AFAICT.  I'd appreciate help!

 thanks,
   



grep -n PID_MAX_DEFAULT /usr/include/linux/threads.h
28:#define PID_MAX_DEFAULT 0x8000
33:#define PID_MAX_LIMIT (sizeof(long)  4 ? 4*1024*1024 : PID_MAX_DEFAULT)

It comes with sys-kernel/linux-headers. Since it s a system package
you should already have it. There is also another version of threads.h
which comes with the kernel source:
/usr/src/linux/include/linux/threads.h, but AFAIK it is recommended to
use the first one.

-- 
Best regards,
Daniel


-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] [OT] where is PID_MAX_DEFAULT ?

2007-01-03 Thread Iain Buchanan
On Thu, 2007-01-04 at 08:48 +0200, Daniel Iliev wrote:
 Iain Buchanan wrote:
  Hi all,
 
  I was just trying to compile one of my programs that includes
  linux/threads.h for the #define PID_MAX_DEFAULT, however, threads.h
  isn't there anymore!

[snip]

 grep -n PID_MAX_DEFAULT /usr/include/linux/threads.h
 28:#define PID_MAX_DEFAULT 0x8000
 33:#define PID_MAX_LIMIT (sizeof(long)  4 ? 4*1024*1024 : PID_MAX_DEFAULT)

$ ls /usr/include/linux/threads.h
ls: cannot access /usr/include/linux/threads.h: No such file or
directory

$ slocate threads.h
/usr/include/X11/Xthreads.h
/usr/include/libxml2/libxml/threads.h
/usr/include/dbus-1.0/dbus/dbus-threads.h
/usr/include/stlport/stl/_threads.h
/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include/g++-v3/bits/stl_threads.h
/usr/lib/klibc/include/linux/threads.h
/usr/share/doc/libvorbis-1.1.2/txt/doc/vorbisfile/threads.html
/usr/src/linux-2.6.18-suspend2/include/linux/threads.h
/usr/src/linux-2.6.19-suspend2-r1/include/linux/threads.h

but I don't want to -I any of those!

 It comes with sys-kernel/linux-headers.

$ equery l linux-headers
[ Searching for package 'linux-headers' in all categories among: ]
 * installed packages
[I--] [ ~] sys-kernel/linux-headers-2.6.19 (0)

what version do you have?

thanks,
-- 
Iain Buchanan iaindb at netspace dot net dot au

The main problem I have with cats is, they're not dogs.
-- Kevin Cowherd

-- 
gentoo-user@gentoo.org mailing list