I get the following warnings when compiling msvcp60:
main.c:108:51: warning: ‘std_BADOFF_func’ defined but not used [-Wunused-function] misc.c:66:40: warning: ‘mutex_mutex_lock’ defined but not used [-Wunused-function] misc.c:73:40: warning: ‘mutex_mutex_unlock’ defined but not used [-Wunused-function] misc.c:80:40: warning: ‘mutex_mutex_ctor’ defined but not used [-Wunused-function] misc.c:87:40: warning: ‘mutex_mutex_dtor’ defined but not used [-Wunused-function] misc.c:175:58: warning: ‘set_new_handler_reset’ defined but not used [-Wunused-function]
Indeed msvcp60.spec contains no _BADOFF, _Mutex or set_new_handler function. I don't see them in my 'database' of exported Windows APIs for msvcp60 but maybe the Windows dlls I built it from where not entirely up to date. Still it looks like these were added in later revisions and thus can be removed from the above files.
misc.c:127:50: warning: ‘wctype’ defined but not used [-Wunused-function]
This one is actually forwarded to msvcp90 according to msvcp60.spec, thus making this implementation redundant. So it should either be removed or msvcp60.spec should be modified.
On 06/28/12 09:30, Francois Gouget wrote:
I get the following warnings when compiling msvcp60:
main.c:108:51: warning: ‘std_BADOFF_func’ defined but not used [-Wunused-function] misc.c:66:40: warning: ‘mutex_mutex_lock’ defined but not used [-Wunused-function] misc.c:73:40: warning: ‘mutex_mutex_unlock’ defined but not used [-Wunused-function] misc.c:80:40: warning: ‘mutex_mutex_ctor’ defined but not used [-Wunused-function] misc.c:87:40: warning: ‘mutex_mutex_dtor’ defined but not used [-Wunused-function] misc.c:175:58: warning: ‘set_new_handler_reset’ defined but not used [-Wunused-function]
misc.c:127:50: warning: ‘wctype’ defined but not used [-Wunused-function]
The function were not removed to make msvcp60 and msvcp90 more similar (and probably because I didn't use -Wunused-function option). Thanks to it one can copy misc.c file between the dlls when it's modified.
All of these functions can be removed.
On Thu, 28 Jun 2012, Piotr Caban wrote: [...]
The function were not removed to make msvcp60 and msvcp90 more similar (and probably because I didn't use -Wunused-function option). Thanks to it one can copy misc.c file between the dlls when it's modified.
Actually there are some implementation differences between msvcp60's and msvcp90's misc.c code. In particular for the init_lockit(), free_lockit() and various _Lockit_ctor_*() functions. Are the two implementations supposed to be identical? There's no indication that the two misc.c files are supposed to remain synchronized but if that's the goal, one option would be to move the msvcp90-specific functions to another file so that it remains easy to copy and/or diff these two misc.c files.
Also a lot of functions actually rely on forwarding to msvcp90. Should this be used for the misc.c functions too?
On 06/28/12 16:33, Francois Gouget wrote:
Actually there are some implementation differences between msvcp60's and msvcp90's misc.c code. In particular for the init_lockit(), free_lockit() and various _Lockit_ctor_*() functions. Are the two implementations supposed to be identical?
I forgot that functions in this file were changed. This implementations are not supposed to be identical.
There's no indication that the two misc.c files are supposed to remain synchronized but if that's the goal, one option would be to move the msvcp90-specific functions to another file so that it remains easy to copy and/or diff these two misc.c files.
All files in msvcp60 and msvcp90 will be quite similar. So it's useful if diff is minimal/readable. But I don't think that splitting most of the files (so some files may be copied) is useful.
Also a lot of functions actually rely on forwarding to msvcp90. Should this be used for the misc.c functions too?
Only if functions are operating on identical object in msvcp60 and msvcp90. I was trying to forward functions when it was possible.