frexp, frexp-nolibm: Move AC_LIBOBJ invocations to module description.
[pspp] / lib / getcwd-lgpl.c
index 53c5562357ca2138c5648e0e52c5abe5758b0330..27614228a0dafd13005453055035145583a9468e 100644 (file)
@@ -45,7 +45,14 @@ rpl_getcwd (char *buf, size_t size)
 
   /* Handle single size operations.  */
   if (buf)
-    return getcwd (buf, size);
+    {
+      if (!size)
+        {
+          errno = EINVAL;
+          return NULL;
+        }
+      return getcwd (buf, size);
+    }
 
   if (size)
     {