mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:44:58 +00:00

In C++, a function declaration with an empty parameter list means that the function takes no arguments. In C, however, it means that the function takes an unspecified number of parameters. What we did previously was therefore non-conforming. This caused a config check to fail in the curl port, as it was able to redeclare `rand` as taking an int parameter.
32 lines
606 B
C
32 lines
606 B
C
/*
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
* Copyright (c) 2021, Maxime Friess <M4x1me@pm.me>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <bits/FILE.h>
|
|
#include <sys/cdefs.h>
|
|
#include <sys/types.h>
|
|
|
|
__BEGIN_DECLS
|
|
|
|
struct group {
|
|
char* gr_name;
|
|
char* gr_passwd;
|
|
gid_t gr_gid;
|
|
char** gr_mem;
|
|
};
|
|
|
|
struct group* getgrent(void);
|
|
void setgrent(void);
|
|
void endgrent(void);
|
|
struct group* getgrnam(const char* name);
|
|
struct group* getgrgid(gid_t);
|
|
int putgrent(const struct group*, FILE*);
|
|
|
|
int initgroups(const char* user, gid_t);
|
|
|
|
__END_DECLS
|