* lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 31 Aug 2006 21:54:54 +0000 (21:54 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 31 Aug 2006 21:54:54 +0000 (21:54 +0000)
Don't include unistd.h or limits.h; not needed, since chdir-long.h
does that for us.
(O_DIRECTORY): Remove.
* modules/chdir-long (Depends-on): Add fcntl.

lib/chdir-long.c
modules/chdir-long

index 8c15d06..50cae34 100644 (file)
@@ -1,5 +1,5 @@
 /* provide a chdir function that tries not to fail due to ENAMETOOLONG
-   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include "chdir-long.h"
 
+#include <fcntl.h>
 #include <stdlib.h>
 #include <stdbool.h>
 #include <string.h>
-#include <unistd.h>
 #include <errno.h>
 #include <stdio.h>
 #include <assert.h>
-#include <limits.h>
 
 #include "memrchr.h"
 #include "openat.h"
 
-#ifndef O_DIRECTORY
-# define O_DIRECTORY 0
-#endif
-
 #ifndef PATH_MAX
 # error "compile this file only if your system defines PATH_MAX"
 #endif
index d8cdb87..18cb94c 100644 (file)
@@ -7,6 +7,7 @@ lib/chdir-long.c
 m4/chdir-long.m4
 
 Depends-on:
+fcntl
 openat
 mempcpy
 memrchr