svn commit: r220139 - stable/8/lib/libutil
Mikolaj Golub
trociny at FreeBSD.org
Tue Mar 29 17:55:16 UTC 2011
Author: trociny
Date: Tue Mar 29 17:55:15 2011
New Revision: 220139
URL: http://svn.freebsd.org/changeset/base/220139
Log:
MFC r200035, r219344:
Bring in missing headers and primitive type declarations into <libutil.h> to
make it work when included by itself.
r200035 (ed):
Make <libutil.h> work when included by itself.
There are several reasons why it didn't work:
- It was missing <sys/cdefs.h> for __BEGIN_DECLS.
- It uses various primitive types that were not declared.
r219344 (pjd):
expand_number() needs uint64_t, declare it here if not already declared.
Approved by: kib (co-mentor), pjd (mentor)
Modified:
stable/8/lib/libutil/libutil.h
Directory Properties:
stable/8/lib/libutil/ (props changed)
Modified: stable/8/lib/libutil/libutil.h
==============================================================================
--- stable/8/lib/libutil/libutil.h Tue Mar 29 17:52:45 2011 (r220138)
+++ stable/8/lib/libutil/libutil.h Tue Mar 29 17:55:15 2011 (r220139)
@@ -39,6 +39,39 @@
#ifndef _LIBUTIL_H_
#define _LIBUTIL_H_
+#include <sys/cdefs.h>
+#include <sys/_types.h>
+
+#ifndef _GID_T_DECLARED
+typedef __gid_t gid_t;
+#define _GID_T_DECLARED
+#endif
+
+#ifndef _INT64_T_DECLARED
+typedef __int64_t int64_t;
+#define _INT64_T_DECLARED
+#endif
+
+#ifndef _UINT64_T_DECLARED
+typedef __uint64_t uint64_t;
+#define _UINT64_T_DECLARED
+#endif
+
+#ifndef _PID_T_DECLARED
+typedef __pid_t pid_t;
+#define _PID_T_DECLARED
+#endif
+
+#ifndef _SIZE_T_DECLARED
+typedef __size_t size_t;
+#define _SIZE_T_DECLARED
+#endif
+
+#ifndef _UID_T_DECLARED
+typedef __uid_t uid_t;
+#define _UID_T_DECLARED
+#endif
+
#define PROPERTY_MAX_NAME 64
#define PROPERTY_MAX_VALUE 512
More information about the svn-src-stable
mailing list