Back to index

glibc  2.9
Functions
unistd.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __wur
ssize_t __REDIRECT (__read_alias,(int __fd, void *__buf, size_t __nbytes), read) __wur
ssize_t __REDIRECT (__read_chk_warn,(int __fd, void *__buf, size_t __nbytes, size_t __buflen), __read_chk) __wur __warnattr("read called with bigger length than size of ""the destination buffer")
__extern_always_inline __wur
ssize_t 
read (int __fd, void *__buf, size_t __nbytes)
char * __getcwd_chk (char *__buf, size_t __size, size_t __buflen) __THROW __wur
char * __REDIRECT_NTH (__getcwd_alias,(char *__buf, size_t __size), getcwd) __wur
char * __REDIRECT_NTH (__getcwd_chk_warn,(char *__buf, size_t __size, size_t __buflen), __getcwd_chk) __wur __warnattr("getcwd caller with bigger length than size of ""destination buffer")
size_t __REDIRECT_NTH (__confstr_alias,(int __name, char *__buf, size_t __len), confstr)
size_t __REDIRECT_NTH (__confstr_chk_warn,(int __name, char *__buf, size_t __len, size_t __buflen), __confstr_chk) __warnattr("confstr called with bigger length than size of destination ""buffer")
int __REDIRECT_NTH (__getgroups_alias,(int __size, __gid_t __list[]), getgroups) __wur
int __REDIRECT_NTH (__getgroups_chk_warn,(int __size, __gid_t __list[], size_t __listlen), __getgroups_chk) __wur __warnattr("getgroups called with bigger group count than what ""can fit into destination buffer")
int __REDIRECT_NTH (__ttyname_r_alias,(int __fd, char *__buf, size_t __buflen), ttyname_r) __nonnull((2))
int __REDIRECT_NTH (__ttyname_r_chk_warn,(int __fd, char *__buf, size_t __buflen, size_t __nreal), __ttyname_r_chk) __nonnull((2)) __warnattr("ttyname_r called with bigger buflen than ""size of destination buffer")

Function Documentation

char* __getcwd_chk ( char *  __buf,
size_t  __size,
size_t  __buflen 
)

Definition at line 25 of file getcwd_chk.c.

{
  if (size > buflen)
    __chk_fail ();

  return __getcwd (buf, size);
}

Here is the call graph for this function:

ssize_t __read_chk ( int  __fd,
void *  __buf,
size_t  __nbytes,
size_t  __buflen 
)

Definition at line 28 of file read_chk.c.

{
  if (nbytes > buflen)
    __chk_fail ();

#ifdef HAVE_INLINED_SYSCALLS
  return INLINE_SYSCALL (read, 3, fd, buf, nbytes);
#else
  return __read (fd, buf, nbytes);
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

ssize_t __REDIRECT ( __read_alias  ,
(int __fd, void *__buf, size_t __nbytes)  ,
read   
)
ssize_t __REDIRECT ( __read_chk_warn  ,
(int __fd, void *__buf, size_t __nbytes, size_t __buflen ,
__read_chk   
)
char* __REDIRECT_NTH ( __getcwd_alias  ,
(char *__buf, size_t __size ,
getcwd   
)
char* __REDIRECT_NTH ( __getcwd_chk_warn  ,
(char *__buf, size_t __size, size_t __buflen ,
__getcwd_chk   
)
size_t __REDIRECT_NTH ( __confstr_alias  ,
(int __name, char *__buf, size_t __len ,
confstr   
)
size_t __REDIRECT_NTH ( __confstr_chk_warn  ,
(int __name, char *__buf, size_t __len, size_t __buflen ,
__confstr_chk   
)
int __REDIRECT_NTH ( __getgroups_alias  ,
(int __size, __gid_t __list[])  ,
getgroups   
)
int __REDIRECT_NTH ( __getgroups_chk_warn  ,
(int __size, __gid_t __list[], size_t __listlen)  ,
__getgroups_chk   
)
int __REDIRECT_NTH ( __ttyname_r_alias  ,
(int __fd, char *__buf, size_t __buflen ,
ttyname_r   
)
int __REDIRECT_NTH ( __ttyname_r_chk_warn  ,
(int __fd, char *__buf, size_t __buflen, size_t __nreal)  ,
__ttyname_r_chk   
)
__extern_always_inline __wur ssize_t read ( int  __fd,
void *  __buf,
size_t  __nbytes 
)

Definition at line 35 of file unistd.h.

{
  if (__bos0 (__buf) != (size_t) -1)
    {
      if (!__builtin_constant_p (__nbytes))
       return __read_chk (__fd, __buf, __nbytes, __bos0 (__buf));

      if (__nbytes > __bos0 (__buf))
       return __read_chk_warn (__fd, __buf, __nbytes, __bos0 (__buf));
    }
  return __read_alias (__fd, __buf, __nbytes);
}

Here is the call graph for this function: