~ubuntu-branches/ubuntu/wily/man-db/wily-proposed

« back to all changes in this revision

Viewing changes to gnulib/lib/getcwd.c

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2013-06-24 11:34:02 UTC
  • mfrom: (1.2.13)
  • Revision ID: package-import@ubuntu.com-20130624113402-6xdn53l2p9qu8yus
Tags: 2.6.4-1
* New upstream release:
  - Document default section list in manual pages (closes: #611007).
  - Quieten most warnings from compiling Gnulib (closes: #668429).
  - The MANLESS environment variable is now treated as if it were a
    default value for the -r option to man: occurrences of the text
    "$MAN_PN" are expanded, and explicitly using the -r option overrides
    the default (closes: #690831).
* Use 'set -e' rather than '#! /bin/sh -e' in maintainer scripts.
* Remove maintainer script support for direct upgrades from pre-etch
  (three releases before current stable).
* Breaks/Replaces manpages-zh (<< 1.5.2-1.1); man-db now ships zh_CN
  translations formerly included there.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 1991-1999, 2004-2012 Free Software Foundation, Inc.
 
1
/* Copyright (C) 1991-1999, 2004-2013 Free Software Foundation, Inc.
2
2
   This file is part of the GNU C Library.
3
3
 
4
4
   This program is free software: you can redistribute it and/or modify
28
28
#include <fcntl.h> /* For AT_FDCWD on Solaris 9.  */
29
29
 
30
30
/* If this host provides the openat function or if we're using the
31
 
   gnulib replacement function, then enable code below to make getcwd
32
 
   more efficient and robust.  */
33
 
#if defined HAVE_OPENAT || defined GNULIB_OPENAT
 
31
   gnulib replacement function with a native fdopendir, then enable
 
32
   code below to make getcwd more efficient and robust.  */
 
33
#if defined HAVE_OPENAT || (defined GNULIB_OPENAT && defined HAVE_FDOPENDIR)
34
34
# define HAVE_OPENAT_SUPPORT 1
35
35
#else
36
36
# define HAVE_OPENAT_SUPPORT 0
135
135
  size_t allocated = size;
136
136
  size_t used;
137
137
 
138
 
#if HAVE_RAW_DECL_GETCWD && HAVE_MINIMALLY_WORKING_GETCWD
 
138
#if HAVE_MINIMALLY_WORKING_GETCWD
139
139
  /* If AT_FDCWD is not defined, the algorithm below is O(N**2) and
140
140
     this is much slower than the system getcwd (at least on
141
141
     GNU/Linux).  So trust the system getcwd's results unless they