Ignore:
Timestamp:
Sep 12, 2004, 9:40:29 PM (21 years ago)
Author:
bird
Message:

Adding BSD stuff like there was no tomorrow.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/include/grp.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r1504 r1505  
    11/* grp.h (emx+gcc) */
    22
    3 #ifndef _GRP_H
     3#ifndef _GRP_H_
     4#define _GRP_H_
    45#define _GRP_H
    56
    6 #if defined (__cplusplus)
    7 extern "C" {
     7#include <sys/cdefs.h>
     8#include <sys/_types.h>
     9
     10__BEGIN_DECLS
     11
     12#ifndef _POSIX_SOURCE
     13#define _PATH_GROUP             "/etc/group"
    814#endif
    915
    10 #if !defined (_GID_T)
    11 #define _GID_T
    12 typedef int gid_t;
     16#if !defined(_GID_T_DECLARED) && !defined(_GID_T)
     17typedef __gid_t gid_t;
     18#define _GID_T_DECLARED
     19#define _GID_T
    1320#endif
     21
     22#if !defined(_SIZE_T_DECLARED) && !defined(_SIZE_T)
     23typedef __size_t size_t;
     24#define _SIZE_T_DECLARED
     25#define _SIZE_T
     26#endif
     27
    1428
    1529struct group
    1630{
    1731  char *gr_name;
     32  char *gr_passwd;
    1833  gid_t gr_gid;
    1934  char **gr_mem;
    2035};
    2136
    22 struct group *getgrgid (gid_t);
    23 struct group *getgrnam (__const__ char *);
     37struct group   *getgrgid (gid_t);
     38struct group   *getgrnam (const char *);
    2439
    25 #if defined (__cplusplus)
    26 }
     40#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
     41struct group   *getgrent(void);
     42int             setgrent(void);
     43void            endgrent(void);
     44void            setgrfile(const char *);
     45int             setgroupent(int);
     46int             getgrgid_r(gid_t, struct group *, char *, size_t, struct group **);
     47int             getgrnam_r(const char *, struct group *, char *, size_t, struct group **);
    2748#endif
    2849
    29 #endif /* not _GRP_H */
     50#if __BSD_VISIBLE
     51const char     *group_from_gid(gid_t, int);
     52int             getgrent_r(struct group *, char *, size_t, struct group **);
     53int             setgroupent(int);
     54#endif
     55
     56__END_DECLS
     57
     58#endif /* not _GRP_H_ */
Note: See TracChangeset for help on using the changeset viewer.