xref: /netbsd-src/external/gpl3/gdb/dist/sim/common/portability.h (revision 88241920d21b339bf319c0e979ffda80c49a2936)
14b169a6bSchristos /* Portability shims for missing OS support.
2*88241920Schristos    Copyright (C) 2021-2024 Free Software Foundation, Inc.
34b169a6bSchristos    Contributed by Mike Frysinger.
44b169a6bSchristos 
54b169a6bSchristos This file is part of the GNU Simulators.
64b169a6bSchristos 
74b169a6bSchristos This program is free software; you can redistribute it and/or modify
84b169a6bSchristos it under the terms of the GNU General Public License as published by
94b169a6bSchristos the Free Software Foundation; either version 3 of the License, or
104b169a6bSchristos (at your option) any later version.
114b169a6bSchristos 
124b169a6bSchristos This program is distributed in the hope that it will be useful,
134b169a6bSchristos but WITHOUT ANY WARRANTY; without even the implied warranty of
144b169a6bSchristos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
154b169a6bSchristos GNU General Public License for more details.
164b169a6bSchristos 
174b169a6bSchristos You should have received a copy of the GNU General Public License
184b169a6bSchristos along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
194b169a6bSchristos 
204b169a6bSchristos #ifndef PORTABILITY_H
214b169a6bSchristos #define PORTABILITY_H
224b169a6bSchristos 
234b169a6bSchristos #ifndef HAVE_GETEGID
244b169a6bSchristos int getegid(void);
254b169a6bSchristos #endif
264b169a6bSchristos 
274b169a6bSchristos #ifndef HAVE_GETEUID
284b169a6bSchristos int geteuid(void);
294b169a6bSchristos #endif
304b169a6bSchristos 
314b169a6bSchristos #ifndef HAVE_GETGID
324b169a6bSchristos int getgid(void);
334b169a6bSchristos #endif
344b169a6bSchristos 
354b169a6bSchristos #ifndef HAVE_GETUID
364b169a6bSchristos int getuid(void);
374b169a6bSchristos #endif
384b169a6bSchristos 
394b169a6bSchristos #ifndef HAVE_SETGID
404b169a6bSchristos int setgid(int gid);
414b169a6bSchristos #endif
424b169a6bSchristos 
434b169a6bSchristos #ifndef HAVE_SETUID
444b169a6bSchristos int setuid(int uid);
454b169a6bSchristos #endif
464b169a6bSchristos 
474b169a6bSchristos #endif
48