I am not sure if I am going to accept this patch. You are using non-standard windows only functions and adding a lot a clutter to the source code which will make it more difficult to maintain.
I might accept a patch which doesn't use so many preprocessor conditionals.
Based on http://msdn.microsoft.com/en-us/library/8ef0s5kh\(v=vs.80).aspx it seams that
_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES can be defined. I suggest you do this in a common header file such as "settings.h".
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In the example you just gave, if the size of "cp" can not be determined at compile time to be large enough its better to use strncpy. Or manually check that the size is correct.
Maybe its best just to suppress C4996 when compiling Aspell.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am going to close this report. I might accept something which doesn't use so many conditionals. If you wish to offer a more palatable patch please reopen this bug or just create a new report.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am not sure if I am going to accept this patch. You are using non-standard windows only functions and adding a lot a clutter to the source code which will make it more difficult to maintain.
I might accept a patch which doesn't use so many preprocessor conditionals.
Based on http://msdn.microsoft.com/en-us/library/8ef0s5kh\(v=vs.80).aspx it seams that
_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES can be defined. I suggest you do this in a common header file such as "settings.h".
Understood, but setting _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES prevents these functions from properly checking for buffer overruns at run-time.
For example, with:
char *cp;
// some stuff here which could assign to or increment cp
strcpy(cp, "appendage");
There's no way for any macro to know how much space is available in the output buffer.
My original comment still holds.
In the example you just gave, if the size of "cp" can not be determined at compile time to be large enough its better to use strncpy. Or manually check that the size is correct.
Maybe its best just to suppress C4996 when compiling Aspell.
I am going to close this report. I might accept something which doesn't use so many conditionals. If you wish to offer a more palatable patch please reopen this bug or just create a new report.