summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGuillem Jover <guillem@hadrons.org>2008-07-09 09:07:03 +0300
committerGuillem Jover <guillem@hadrons.org>2008-07-09 09:07:03 +0300
commit38829bdc8b5dd17d8d10a2daf350605e7c6f70a4 (patch)
tree724529be261a5f7ce39580a69c8b85b676f3f61f /include
parenta5f7d1a8f12b0ce3b76a23dccb8a5ffdc31ebf39 (diff)
downloadlibbsd-38829bdc8b5dd17d8d10a2daf350605e7c6f70a4.tar.gz
Add new setmode and getmode functions from FreeBSD
Diffstat (limited to 'include')
-rw-r--r--include/bsd/stdlib.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/bsd/stdlib.h b/include/bsd/stdlib.h
index f450e56..16376cb 100644
--- a/include/bsd/stdlib.h
+++ b/include/bsd/stdlib.h
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2005 Aurelien Jarno
* Copyright (C) 2006 Robert Millan
+ * Copyright (C) 2008 Guillem Jover
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -28,6 +29,7 @@
#ifndef LIBBSD_STDLIB_H
#define LIBBSD_STDLIB_H
+#include <sys/stat.h>
#include <stdlib.h>
const char *fmtcheck (const char *, const char *);
@@ -37,4 +39,11 @@ void setprogname (char *);
int heapsort (void *, size_t, size_t, int (*)(const void *, const void *));
+#ifndef S_ISTXT
+#define S_ISTXT S_ISVTX
+#endif
+
+mode_t getmode(const void *set, mode_t mode);
+void *setmode(const char *mode_str);
+
#endif