Re: [RFC] msvcrt: defines break C++ code

2003-01-10 Thread Dimitrie O. Paun
On January 10, 2003 01:05 pm, Alexandre Julliard wrote: I think making them inline functions should work for now. whineHow come I always get these assignments?/whine :) Hey, I did just some of them (basically io.h and sys/*.h), to preserve some form of sanity. Too much header work can lead to

[RFC] msvcrt: defines break C++ code

2003-01-09 Thread Dimitrie O. Paun
Folks, We have a lot of code in msvcrt headers like so: #define umask _umask #define unlink _unlink #define write _write This breaks C++ that define a write method in a header, and then implement it like so: #include io.h void MyClass::write(...) { write(...); } I suggest we turn those

Re: [RFC] msvcrt: defines break C++ code

2003-01-09 Thread Dan Kegel
Dimitrie O. Paun wrote: I suggest we turn those defines into inlines, like this: inline int write(int fd, const void* ptr, unsigned int size) { return _write(fd, ptr, size); } Any other solutions? Sure, there are two: 0. use a linker alias for _write 1. actually have a function write() that

Re: [RFC] msvcrt: defines break C++ code

2003-01-09 Thread Francois Gouget
On Thu, 9 Jan 2003, Dimitrie O. Paun wrote: Folks, We have a lot of code in msvcrt headers like so: #define umask _umask #define unlink _unlink #define write _write [...] I suggest we turn those defines into inlines, like this: inline int write(int fd, const void* ptr, unsigned int

Re: [RFC] msvcrt: defines break C++ code

2003-01-09 Thread Alexandre Julliard
Francois Gouget [EMAIL PROTECTED] writes: The strange thing is that the MSVC headers simply define their prototype, e.g.: _CRTIMP int __cdecl umask(int); Yet these APIs are not exported by the msvcrt library or by any other dll that I know of. And still applications compile and link! I

Re: [RFC] msvcrt: defines break C++ code

2003-01-09 Thread Dimitrie O. Paun
On January 9, 2003 08:38 pm, Alexandre Julliard wrote: I think you have to link with oldnames.lib for that. We probably have to provide an oldnames.lib too. OK, but what do we do now about those defines? -- Dimi.