checkedc/include/grp_checked.h

38 строки
1.0 KiB
C
Исходник Постоянная ссылка Обычный вид История

2021-05-04 17:43:32 +03:00
//---------------------------------------------------------------------//
// Bounds-safe interfaces for functions in grp.h that //
// take pointer arguments. //
// //
/////////////////////////////////////////////////////////////////////////
// The Windows environment may not have grp.h
#if defined __has_include_next && __has_include_next(<grp.h>)
2021-05-04 17:43:32 +03:00
#ifdef __checkedc
#pragma CHECKED_SCOPE push
#pragma CHECKED_SCOPE off
#endif
#include_next <grp.h>
#ifdef __checkedc
#pragma CHECKED_SCOPE pop
#endif
#ifdef __checkedc
#ifndef __GRP_CHECKED_H
#define __GRP_CHECKED_H
#pragma CHECKED_SCOPE push
#pragma CHECKED_SCOPE on
int initgroups(const char *user : itype(_Nt_array_ptr<const char>), gid_t group);
#pragma CHECKED_SCOPE pop
#endif // guard
#endif // Checked C
#else // doesn't have grp.h
#error "cannot include 'grp_checked.h' because this system does not have the original 'grp.h'"
#endif