Hi Peter, Frank,
Here is the fsync function. I get compile errors when converting it to a macro in os-hacks.h - so please convert it for me.
int fsync (int __fd) { return FlushFileBuffers ((HANDLE) _get_osfhandle (__fd)); }
On 25 Jan 00, at 10:22, Frank Heckenbach wrote:
The relevant functions and data types are:
NAME getpwnam, getpwuid - get password file entry
SYNOPSIS #include <pwd.h> #include <sys/types.h>
struct passwd *getpwnam(const char * name);
[...]
Here is my implementation. The WinAPI calls are correct, but I am clearly not doing things correctly as far as the return values for pointers to the passwd structure is concerned - I get garbabe in the fields when I call the functions that return pointers to the passwd structure (but inside the functions themselves, when I do "printf" of the return values from the WinAPI functions, I get correct values). So the problem is how to assign the values returned by WinAPI to the fields of the structure, and how to return correctly.
The source file is attached.
Yours, Bimbo. -- Dr Abimbola A Olowofoyeku School of Law Keele University Keele ST5 5BG England. Email: laa12@keele.ac.uk
Tel: +44 (0)1782 584 363 Fax: +44 (0)1782 583 228 http://www.keele.ac.uk/depts/la/home.htm
The following section of this message contains a file attachment prepared for transmission using the Internet MIME message format. If you are using Pegasus Mail, or any another MIME-compliant system, you should be able to save it or view it from within your mailer. If you cannot, please ask your system administrator for assistance.
---- File information ----------- File: passwd.c Date: 4 Feb 2000, 17:17 Size: 5600 bytes. Type: Program-source