aboutsummaryrefslogtreecommitdiffstats
path: root/pseudo.h
diff options
context:
space:
mode:
authorPeter Seebach <peter.seebach@windriver.com>2012-12-12 15:37:35 -0600
committerPeter Seebach <peter.seebach@windriver.com>2012-12-12 15:37:35 -0600
commit874bea3c664161c2297d5d5f4f93408330e005f5 (patch)
tree37d8595c1024446a027aad9ac642ffd07e7141db /pseudo.h
parentb6c2409d786e53f62accc1c7a6538f39dd0ab601 (diff)
downloadpseudo-874bea3c664161c2297d5d5f4f93408330e005f5.tar.gz
pseudo-874bea3c664161c2297d5d5f4f93408330e005f5.tar.bz2
pseudo-874bea3c664161c2297d5d5f4f93408330e005f5.zip
add linkat() implementation
We never had an implementation for linkat() because no one used it; now someone uses it. link() is now implemented on top of linkat(). Note the abnormal AT_SYMLINK_FOLLOW (as opposed to _NOFOLLOW) flag.
Diffstat (limited to 'pseudo.h')
-rw-r--r--pseudo.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/pseudo.h b/pseudo.h
index 297d6d8..5c3eabe 100644
--- a/pseudo.h
+++ b/pseudo.h
@@ -113,4 +113,12 @@ extern char *pseudo_version;
#define O_LARGEFILE 0
#endif
+/* Does link(2) let you create hard links to symlinks? Of course not. Who
+ * would ever do that? Well, Linux did, and possibly as a result, linkat()
+ * does by default too; if you are on a host with the historical Unix
+ * behavior of following symlinks to find the link target, you will want
+ * to set this to AT_SYMLINK_FOLLOW. Darwin does.
+ */
+#define PSEUDO_LINK_SYMLINK_BEHAVIOR 0
+
#include "pseudo_ports.h"