X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fgetcwd.c;h=6658ed58c0c4982bd073090956bec8c30ea15a56;hb=5a21606b0d57082670bd060d169492c2f3a410f2;hp=2da1aeef28ae0d375aed3c47dbfdc3f9197bd189;hpb=fc333501ca97880108c8ff17e33d9dd7d5e28ed4;p=gnulib.git diff --git a/lib/getcwd.c b/lib/getcwd.c index 2da1aeef2..6658ed58c 100644 --- a/lib/getcwd.c +++ b/lib/getcwd.c @@ -59,20 +59,6 @@ #include -/* Work around a bug in Solaris 9 and 10: AT_FDCWD is positive. Its - value exceeds INT_MAX, so its use as an int doesn't conform to the - C standard, and GCC and Sun C complain in some cases. */ -#if 0 < AT_FDCWD && AT_FDCWD == 0xffd19553 -# undef AT_FDCWD -# define AT_FDCWD (-3041965) -#endif - -#ifdef ENAMETOOLONG -# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG) -#else -# define is_ENAMETOOLONG(x) 0 -#endif - #ifndef MAX # define MAX(a, b) ((a) < (b) ? (b) : (a)) #endif @@ -164,7 +150,7 @@ __getcwd (char *buf, size_t size) # undef getcwd dir = getcwd (buf, size); - if (dir || (errno != ERANGE && !is_ENAMETOOLONG (errno) && errno != ENOENT)) + if (dir || (errno != ERANGE && errno != ENAMETOOLONG && errno != ENOENT)) return dir; #endif