summaryrefslogtreecommitdiff
path: root/src/lib/libast/features/syscall
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2012-06-24 22:28:35 +0000
committerIgor Pashev <pashev.igor@gmail.com>2012-06-24 22:28:35 +0000
commit3950ffe2a485479f6561c27364d3d7df5a21d124 (patch)
tree468c6e14449d1b1e279222ec32f676b0311917d2 /src/lib/libast/features/syscall
downloadksh-upstream.tar.gz
Imported Upstream version 93u+upstream
Diffstat (limited to 'src/lib/libast/features/syscall')
-rw-r--r--src/lib/libast/features/syscall18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/lib/libast/features/syscall b/src/lib/libast/features/syscall
new file mode 100644
index 0000000..9788b9b
--- /dev/null
+++ b/src/lib/libast/features/syscall
@@ -0,0 +1,18 @@
+lib sysgetcwd note{ syscall(SYS_getcwd,buf,len) implemented }end link{
+ #include <sys/syscall.h>
+ int main()
+ {
+ char buf[256];
+ return syscall(SYS_getcwd, buf, sizeof(buf)) < 0;
+ }
+}end
+
+if ( _lib_sysgetcwd ) {
+ #include <sys/syscall.h>
+}
+endif
+
+if ( _lib_sysgetcwd ) {
+ #define SYSGETCWD(a,b) syscall(SYS_getcwd,a,b)
+}
+endif