NO

Author Topic: Using MS standard headers on PellesC  (Read 43477 times)

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 1769
Re: Using MS standard headers on PellesC
« Reply #60 on: April 05, 2014, 05:13:36 pm »
I would like to have two tables of all the (?) header files of Pelles C and MS with the following infos:

  • header file is usable by Pelles C
  • header file is up to date
  • file needs a C++ Compiler
  • header file is a COM interface
  • file is in work by [name]
Yes one of the scopes of the 'copying' tool was to keep a complete list of files, if open the zip and look inside MS-Headers.lst' you will see that you can comment-out files. With some little more code we can add a comment.

this tables should be available and editable by all of us.
Secondly, there should be a expandable list of typical errors in the MS files

  • There are no comment signs '//' after endif, per example.

So every helpers can learn from the experiences of others.

And last but not least. The converted header files should be collected in an downloadable zip-file.

I do not know if this forum software is able to help in one of this points?

What about the wiki?

czerny
The limit is the platform, I don't think the forum support file condivision ...
Maybe it is too early for the wiki ...  :-\

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 1769
Re: Using MS standard headers on PellesC
« Reply #61 on: April 05, 2014, 05:16:10 pm »
WinMerge is a good tool for comparing files / dirs.

John's error list comes from 64-bit version.
Yes Timo we can try with WinMerge.
John FindFile can be compiled in its 32 bits version?

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 1899
Re: Using MS standard headers on PellesC
« Reply #62 on: April 05, 2014, 05:23:37 pm »
FindFile can compiled to both versions (64-bit after minor fix).
May the source be with you

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 1769
Re: Using MS standard headers on PellesC
« Reply #63 on: April 05, 2014, 05:31:49 pm »
FindFile can compiled to both versions (64-bit after minor fix).
Good to hear!  :)

JohnF

  • Guest
Re: Using MS standard headers on PellesC
« Reply #64 on: April 05, 2014, 05:36:23 pm »
Frankie,

>>at this point is more usefull to patch the standard
>>PellesC headers with the missing functionalities!

We could then distribute the headers in a zip.

John

czerny

  • Guest
Re: Using MS standard headers on PellesC
« Reply #65 on: April 05, 2014, 05:51:24 pm »
Yes one of the scopes of the 'copying' tool was to keep a complete list of files, if open the zip and look inside MS-Headers.lst' you will see that you can comment-out files. With some little more code we can add a comment.

The problem will be that there are as many incarnations of this list as downloaders.
For example, what is the actual file of MS-Headers.lst? This one, included in your tool or that one posted by Timovjl?

czerny

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 1769
Re: Using MS standard headers on PellesC
« Reply #66 on: April 05, 2014, 05:53:33 pm »
Frankie,

>>at this point is more usefull to patch the standard
>>PellesC headers with the missing functionalities!

We could then distribute the headers in a zip.

John

Yes, but it will be much more complicate to define what to add ...  :P
Even if IMHO the average of us has never felt the need of something outside of standard PellesC distribution, there is too much stuff inside new SDK's to choose what move and what not.
My original 'hope' was that was possible to produce a kind of preheader with many #defines to use the preprocessor to autofix the MS-headers, but this proven not facible.
The fastest way is to have a compiler that is fully compatible with MSVC, but PellesC is standard compliant and MSVC not ... they could never meet  :-\
My first need for something more was the use of COM headers that were not in PellesC, in that case the use of a preheader was working to remove annotation (yes the PRE-Fast technology  >:( )

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 1769
Re: Using MS standard headers on PellesC
« Reply #67 on: April 05, 2014, 05:58:27 pm »
The problem will be that there are as many incarnations of this list as downloaders.
For example, what is the actual file of MS-Headers.lst? This one, included in your tool or that one posted by Timovjl?
I have put the last version, that incidentally is the Timo's version, in the attachment of the locked thread.
While we organize better let say that the locked thread is the reference.

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 1899
Re: Using MS standard headers on PellesC
« Reply #68 on: April 05, 2014, 06:23:46 pm »
In my link should be MS-HeaderFix.lst only in FixHdrLst.zip ?

Can anyone figure out why this works with msado15.h / adoint.h ?
Code: [Select]
...
#define ADOErrors Errors
#define ADOError Error
#define ADOProperties Properties
#define _ADOConnection _Connection
#define _ADORecordset _Recordset
#define _ADOParameters _Parameters
#define _ADOParameter _Parameter
#define ADOParameters Parameters
#define _ADOCommand _Command
#define _ADORecord _Record
#define ADOFields Fields
#define ADOField Field
#define _ADOStream _Stream
#define ADOProperty Property
#include <msado15.h>
...
« Last Edit: April 05, 2014, 06:33:11 pm by timovjl »
May the source be with you

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 567
    • Homepage
Re: Using MS standard headers on PellesC
« Reply #69 on: April 05, 2014, 07:04:06 pm »
An SVN repository or similar would be the best to allow smooth collaboration in this project.

You have all you need:

  • users can lock files they work on, so no two users will work on the same file
  • easy update and commit of changes
  • etc.
---
Stefan

Proud member of the UltraDefrag Development Team

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 1899
Re: Using MS standard headers on PellesC
« Reply #70 on: April 06, 2014, 11:23:34 am »
Here are old WinMerge.exe and patch.exe.

Example in unified mode:
Code: [Select]
--- include\Win.SDK\StrAlign.h
+++ include\Win\StrAlign.h
@@ -42,6 +42,7 @@
 
 #if !defined(__STRALIGN_H_) && !defined(MIDL_PASS)
 #define __STRALIGN_H_
+#include <wchar.h>
 
 #ifndef _STRALIGN_USE_SECURE_CRT
 #if defined(__GOT_SECURE_LIB__) && __GOT_SECURE_LIB__ >= 200402L
Code: [Select]
patch.exe -u include\Win\StrAlign.h StrAlign.h.diff
« Last Edit: April 08, 2014, 12:08:38 pm by TimoVJL »
May the source be with you

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 1769
Re: Using MS standard headers on PellesC
« Reply #71 on: April 06, 2014, 04:01:29 pm »
Timo what about to use all GNU-Win tools?
We can compile them in source and merge in the tool so it can do anything in one pass: backup the system, copy files and patch them.  ;)
Anyway the things changed very fast, a new release of compiler has been deployed, and from I can read many bugs have been removed and more functionalities have been added.
I.e when pelle say
Added #pragma default_convention() to deal with annoying third-party header files.
what is the side effect on MS-headers?

EDIT: That's just for headers that miss the correct calling convention (to avoid to patch all functions call).

Unfortunately I only have an XP-PE32 machine for all my jobs (and don't want take more with me around the world) I can't take a look to the new version not even to documentation (refuses to install on XP).
So I'm considering:
  • Is this just a waste of time? Maybe new version doesn't need patching or not made this way...
  • All the patches we have found and fixed, showed on the locked thread, have a sense? We are blindly patching headers were the presence of polymorphism clearly shows that that files are intended for C++ (the patches applied permit to use them from plain C  ;D, but are the majority of us able to use them?). Will they be of any use? Who tested any program that needs them?
  • In the new release Pelle added some more headers maybe they are enough?
  • Some patches relative to zero size arrays are plain C class trnslations, while the patches remove the warnings are the structure functional? who take care of verify if they works? There are many ways to patch this kind of declaration is the chosed one the correct one?
Maybe we have to complete the tool and made it working on the base set of headers, then add something else when it use is requested...
« Last Edit: April 06, 2014, 04:56:27 pm by frankie »

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 1899
Re: Using MS standard headers on PellesC
« Reply #72 on: April 06, 2014, 05:32:16 pm »
For someone who just want to just test WSDK with separated copy of PellesC.
make these changes to Pellesc ctype.h
Quote
#ifdef _MSC_EXTENSIONS
/* for compiling with windows.h -- see Microsoft ctype.h */
#ifndef _WCHAR_T_DEFINED
#define _WCHAR_T_DEFINED
typedef unsigned short wchar_t;
#include <wchar.h>
#endif
#pragma warn(disable: 1058 1063) // <-- add this for MS bugs
#ifdef _WIN64
#pragma warn(disable: 2195) // <-- add this for 64 bit
#endif

#endif /* _MSC_EXTENSIONS */
and copy WSDK headers with frankie's tool and libs manually.
« Last Edit: April 06, 2014, 05:36:39 pm by TimoVJL »
May the source be with you

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 1769
Re: Using MS standard headers on PellesC
« Reply #73 on: April 06, 2014, 09:13:46 pm »
I had a look over the new release of PellesC, as far as I can see the project scope is still valid.
The compiler seems to be more logorroic ( :D joke) I got more warnings on already patched files.
I'll go on...

JohnF

  • Guest
Re: Using MS standard headers on PellesC
« Reply #74 on: April 10, 2014, 09:38:27 pm »
Frankie,

Would it not be easier to identify which bits are missing (and worth while) and then add those bits to Pelle's headers.

EDIT: For the PellesC headers that already exist of course.

John
« Last Edit: April 10, 2014, 09:51:22 pm by JohnF »