* Removed all Id tags.
[cacao.git] / src / toolbox / util.c
index 610e6aa955aea3cdbf084ba27ae2f064eca83924..82acc8ff7f517543a2999cb0fd9af244295f7f15 100644 (file)
 
    Changes:
 
-   $Id: util.c 4357 2006-01-22 23:33:38Z twisti $
-
 */
 
 
+#include "config.h"
+
 #include <assert.h>
 #include <errno.h>
 #include <stdarg.h>
 #include "vm/types.h"
 
 #include "mm/memory.h"
-#include "vm/exceptions.h"
-#include "vm/stringlocal.h"
+#include "vm/vm.h"
+
 
+/* _Jv_getcwd ******************************************************************
 
-/* getcwd **********************************************************************
+   Return the current working directory.
 
-   XXX
+   RETURN VALUE:
+       pointer to a char array allocated by MNEW, or
+          NULL if memory could not be allocated.
 
 *******************************************************************************/
 
@@ -69,8 +72,7 @@ char *_Jv_getcwd(void)
                /* too small buffer or a more serious problem */
 
                if (errno != ERANGE)
-                       throw_cacao_exception_exit(string_java_lang_InternalError,
-                                                                          strerror(errno));
+                       vm_abort("getcwd failed: %s", strerror(errno));
 
                /* double the buffer size */