What is sys / user.h used for?
I was going through the code of a linux application and I saw #include in one of the code files. I tried to search for it on opengroup.org but I couldn't find it, this is how the sys directory looks like: http://www.opengroup.org/onlinepubs/000095399/basedefs/sys/ , I am assuming it is not a standard header file but I checked it in my / usr / include / sys and it was there.
What does it do and what is it used for? If you can provide me with guidance for this, I would appreciate it. Thank you.
a source to share
The comment at the top of the header pretty much says it all:
#ifndef _SYS_USER_H
#define _SYS_USER_H 1
/* The whole purpose of this file is for GDB and GDB only. Don't read
too much into it. Don't use it for anything other than GDB unless
you know what you are doing. */
GNU special extensions are usually fairly easy to identify (for example _GNU_SOURCE
). However, debugging and instrumentation should work even if these extensions are not enabled. For example, people want to use GDB for code that isn't #define _GNU_SOURCE
.
In this case, material that is not defined in ISO C (and is not required by POSIX) is usually clearly identified as such.
You will also find all kinds of weird looking symbols in programs that include Valgrind headers .
a source to share