[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Windows Build Broken: /ccvs/lib/ xgetwd.c, xgetcwd.c, xgetcwd.h
From: |
Conrad T. Pino |
Subject: |
RE: Windows Build Broken: /ccvs/lib/ xgetwd.c, xgetcwd.c, xgetcwd.h |
Date: |
Tue, 5 Oct 2004 16:35:03 -0700 |
Hi Derek,
> From: Conrad T. Pino
>
> Doesn't look like a good idea to me. The Windows/VC6 platform don't have
> a "getcwd" function. They have "_getcwd" instead:
I take this one back. Although both Google and MSDN searches fail to find
documentation for "getcwd" nevertheless it is definately there since this
program compiles with no warnings or errors and works as expected:
#include <stdio.h>
#include <direct.h>
#include <malloc.h>
int main( int argc, char* argv[] )
{
char * buffer;
printf( "Hello world!\n\n" );
printf( "getcwd: %s\n\n", buffer = getcwd( NULL, 0 ) );
free( buffer );
return 0;
}
The output from the program is:
H:\Conrad\Projects\work\test_getcwd\Debug>test_getcwd
Hello world!
getcwd: H:\Conrad\Projects\work\test_getcwd\Debug
H:\Conrad\Projects\work\test_getcwd\Debug>
I'll try you're suggestions as orginally proposed.
Conrad