--- /dev/null
+#include <config.h>
+#include <sys/types.h>
+#include <errno.h>
+
+/* A trivial substitute for `fchown'.
+
+ DJGPP 2.03 and earlier (and perhaps later) don't have `fchown',
+ so we pretend no-one has permission for this operation. */
+
+int fchown (int fd, uid_t uid, gid_t gid)
+{
+ errno = EPERM;
+ return -1;
+}
--- /dev/null
+#include <config.h>
+#include <sys/stat.h>
+
+/* A trivial substitute for `lstat'.
+
+ DJGPP 2.03 and earlier don't have `lstat' and don't support
+ symlinks. */
+
+int lstat (const char *fname, struct stat *st_buf)
+{
+ return stat (fname, st_buf);
+}
--- /dev/null
+#include <config.h>
+#include <stddef.h>
+#include <errno.h>
+
+/* A trivial substitute for `readlink'.
+
+ DJGPP 2.03 and earlier don't have `readlink' and don't support
+ symlinks. */
+
+int readlink (const char *filename, char *buffer, size_t size)
+{
+ errno = EINVAL;
+ return -1;
+}