NO

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

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: Using MS standard headers on PellesC
« Reply #75 on: April 11, 2014, 05:17:28 PM »
WSDK 8
Code: [Select]
winioctl.h(7277): error #2065: Invalid use of incomplete type 'STORAGE_QUERY_DEPENDENT_VOLUME_LEV1_ENTRY []'.
winioctl.h(7278): error #2065: Invalid use of incomplete type 'STORAGE_QUERY_DEPENDENT_VOLUME_LEV2_ENTRY []'.
winioctl.h(7279): error #2065: Invalid use of incomplete type '(incomplete) union (no name)'.
maybe better like this
Code: [Select]
STORAGE_QUERY_DEPENDENT_VOLUME_LEV1_ENTRY[1]
STORAGE_QUERY_DEPENDENT_VOLUME_LEV2_ENTRY[1]
May the source be with you

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: Using MS standard headers on PellesC
« Reply #76 on: April 11, 2014, 06:13:22 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

John and all I'm sorry, but due to my work duties I have been very busy to update anything, I hope this weekend to produce something.
We planned to integrate in the tool the patch utility, so it will copy and patch file so you should have a fully working set after it run.
Anyway I'm limited on the 64 bits side and need help to test on that side.
Moreover Timo is already looking on the copy problem, John maybe you can also help to discover why the copy fails on some systems and possibly patch the tool (UAC?).
Before to move to add headers to PellesC I would like to have this job finished, so we can use the two headers set for cross-check.
What are your comments?
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

JohnF

  • Guest
Re: Using MS standard headers on PellesC
« Reply #77 on: April 11, 2014, 08:27:19 PM »
We planned to integrate in the tool the patch utility, so it will copy and patch file so you should have a fully working set after it run.

Ok that sounds good.

Anyway I'm limited on the 64 bits side and need help to test on that side.
Moreover Timo is already looking on the copy problem, John maybe you can also help to discover why the copy fails on some systems and possibly patch the tool (UAC?).
Before to move to add headers to PellesC I would like to have this job finished, so we can use the two headers set for cross-check.
What are your comments?

I will take a look at that copy app and let you know what I find.

Is there something in particular you would like me to look into for 64bit?

EDIT: I apologize - the problem with the copy app was my fault in that my SDK setup was wrong. The Registry entry was not correct.

So, no problem copying the headers.

John
« Last Edit: April 11, 2014, 08:46:01 PM by JohnF »

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: Using MS standard headers on PellesC
« Reply #78 on: April 11, 2014, 10:12:37 PM »
Tip for 32-bit user to compile to WIN64.
start ide from patch file
Code: [Select]
SET INCLUDE=C:\code1\PellesC8\include;C:\code1\PellesC8\include\Win
START C:\code1\PellesC8\Bin\poide.exe -x -xml PellesC8.xml
insert into tools menu
Code: [Select]
Menu test: pocc x64
Command:   C:\code1\PellesC8\Bin\pocc.exe
Arguments: -Ze -Tamd64-coff $(FilePath)
Use Output tab
May the source be with you

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: Using MS standard headers on PellesC
« Reply #79 on: April 12, 2014, 03:34:45 PM »
EDIT: I apologize - the problem with the copy app was my fault in that my SDK setup was wrong. The Registry entry was not correct.
So, no problem copying the headers.
Happy to hear this.  :D Anyway the utility allows to manually select folder from and to copy.
Is there something in particular you would like me to look into for 64bit?
Sure could you check if you get only warnings or also errors on sources that you have possibly using less usual headers.
thanks John
« Last Edit: April 12, 2014, 11:37:23 PM by frankie »
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

czerny

  • Guest
Re: Using MS standard headers on PellesC
« Reply #80 on: April 14, 2014, 10:24:43 AM »
For those who still don't know that it is possible to run several versions of PellesC in same machine with commandline options -x -xml.

What about the 'sysdef.tag' file in %HOMEPATH%l\Application Data\Pelles C.

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: Using MS standard headers on PellesC
« Reply #81 on: April 14, 2014, 11:21:47 AM »
What about the 'sysdef.tag' file in %HOMEPATH%l\Application Data\Pelles C.
Just create/move sysdef.tag to PellesC\bin folder.
It can be empty one at first start.
May the source be with you

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: Using MS standard headers on PellesC
« Reply #82 on: April 26, 2014, 12:06:47 PM »
I'm a little bit tired and some pis..off  >:(
There is a big mess between console applications, gui applications allocating a console, threads and whatever you can imagine of.. >:(
The project workspace contains a working copy of patch with many trials to make it work ... not perfectly damn it  >:(, but at least in the same way ...
Does anybody understood why the I/O subsystem plays up this way around?
I have reinitialized all local static variables, global variables and the rest. I have reduced to minimum low level I/O, I have simplified it, but the various versions behaves differently from the first run  >:(
It seems that PellesC libraries have some problems too.
Anyway if during tests you get messages about existing temporary files just delete them. They are located in the temp directory of your system (usually C:\Documents and Settings\<current user>\Local Settings\Temp).
If someone find the problem or some explanation is welcome ...  :(

P.S. The problem is not Patch itself, but when you use it in a gui multithreaded (especially multithreaded) environment, fopen, fclose, _open _close &CO messed up...
I Added the diffs.txt patch file.
« Last Edit: April 26, 2014, 03:19:06 PM by frankie »
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

JohnF

  • Guest
Re: Using MS standard headers on PellesC
« Reply #83 on: April 26, 2014, 05:06:22 PM »
Well, you've certainly been busy, well done so far!

John



Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: Using MS standard headers on PellesC
« Reply #84 on: April 27, 2014, 11:36:23 AM »
Well, you've certainly been busy, well done so far!

John

Thanks John, I was so busy to get really really stupid!  ;D
I can't pretend to link a sigle threaded lib with a multithreaded executable!  ;D
I waste a lot of time, but didn't noticed it  >:(, at last I discovered the problem due to I/O and 'errno' synch between threads.  :(

I should be able to post something in short now ...  8)
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

JohnF

  • Guest
Re: Using MS standard headers on PellesC
« Reply #85 on: April 27, 2014, 08:25:34 PM »
New version 1.21 of the tool.
Now it backups your installation, copy the required files from SDK 7.1 and patches them.


Nice! I'm getting this error whenever windows.h is included.

B:\PellesC\Include\Win\specstrings.h(11): fatal error #1035: Can't find include file <sal.h>.
*** Error code: 1 ***

John

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: Using MS standard headers on PellesC
« Reply #86 on: April 27, 2014, 08:42:09 PM »
sal.h is missing from v 8 ?
May the source be with you

JohnF

  • Guest
Re: Using MS standard headers on PellesC
« Reply #87 on: April 27, 2014, 09:11:20 PM »
Thanks for sal.h

64bit
B:\PellesC\Include\Win\winnt.h(898): warning #2195: Unrecognized intrinsic function: '_rotl8'.
B:\PellesC\Include\Win\winnt.h(899): warning #2195: Unrecognized intrinsic function: '_rotl16'.
B:\PellesC\Include\Win\winnt.h(900): warning #2195: Unrecognized intrinsic function: '_rotr8'.
B:\PellesC\Include\Win\winnt.h(901): warning #2195: Unrecognized intrinsic function: '_rotr16'.
B:\PellesC\Include\Win\winnt.h(2609): warning #2195: Unrecognized intrinsic function: '_InterlockedIncrement16'.
B:\PellesC\Include\Win\winnt.h(2610): warning #2195: Unrecognized intrinsic function: '_InterlockedDecrement16'.
B:\PellesC\Include\Win\winnt.h(2611): warning #2195: Unrecognized intrinsic function: '_InterlockedCompareExchange16'.
B:\PellesC\Include\Win\winnt.h(2612): warning #2195: Unrecognized intrinsic function: '_InterlockedAnd'.
B:\PellesC\Include\Win\winnt.h(2613): warning #2195: Unrecognized intrinsic function: '_InterlockedOr'.
B:\PellesC\Include\Win\winnt.h(2614): warning #2195: Unrecognized intrinsic function: '_InterlockedXor'.
B:\PellesC\Include\Win\winnt.h(2620): warning #2195: Unrecognized intrinsic function: '_InterlockedAnd64'.
B:\PellesC\Include\Win\winnt.h(2621): warning #2195: Unrecognized intrinsic function: '_InterlockedOr64'.
B:\PellesC\Include\Win\winnt.h(2622): warning #2195: Unrecognized intrinsic function: '_InterlockedXor64'.
B:\PellesC\Include\Win\winnt.h(2703): warning #2195: Unrecognized intrinsic function: '_ReadWriteBarrier'.
B:\PellesC\Include\Win\winnt.h(2759): warning #2195: Unrecognized intrinsic function: '__faststorefence'.
B:\PellesC\Include\Win\winnt.h(2765): warning #2195: Unrecognized intrinsic function: '_m_prefetchw'.
B:\PellesC\Include\Win\winnt.h(2811): warning #2195: Unrecognized intrinsic function: '__int2c'.
B:\PellesC\Include\Win\winnt.h(2835): warning #2195: Unrecognized intrinsic function: '__getcallerseflags'.
B:\PellesC\Include\Win\winnt.h(2848): warning #2195: Unrecognized intrinsic function: '__segmentlimit'.
B:\PellesC\Include\Win\winnt.h(2861): warning #2195: Unrecognized intrinsic function: '__readpmc'.
B:\PellesC\Include\Win\winnt.h(2969): warning #2195: Unrecognized intrinsic function: '__mulh'.
B:\PellesC\Include\Win\winnt.h(2970): warning #2195: Unrecognized intrinsic function: '__umulh'.
B:\PellesC\Include\Win\winnt.h(2993): warning #2195: Unrecognized intrinsic function: '__shiftleft128'.
B:\PellesC\Include\Win\winnt.h(2994): warning #2195: Unrecognized intrinsic function: '__shiftright128'.
B:\PellesC\Include\Win\winnt.h(3009): warning #2195: Unrecognized intrinsic function: '_mul128'.
B:\PellesC\Include\Win\winnt.h(3022): warning #2195: Unrecognized intrinsic function: '_umul128'.
B:\PellesC\Include\Win\winbase.h(2208): warning #2195: Unrecognized intrinsic function: '_InterlockedAnd'.
B:\PellesC\Include\Win\winbase.h(2209): warning #2195: Unrecognized intrinsic function: '_InterlockedOr'.
B:\PellesC\Include\Win\winbase.h(2210): warning #2195: Unrecognized intrinsic function: '_InterlockedXor'.
B:\PellesC\Include\Win\winbase.h(2218): warning #2195: Unrecognized intrinsic function: '_InterlockedAnd64'.
B:\PellesC\Include\Win\winbase.h(2219): warning #2195: Unrecognized intrinsic function: '_InterlockedOr64'.
B:\PellesC\Include\Win\winbase.h(2220): warning #2195: Unrecognized intrinsic function: '_InterlockedXor64'.

John

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: Using MS standard headers on PellesC
« Reply #88 on: April 27, 2014, 10:29:38 PM »
Nice! I'm getting this error whenever windows.h is included.

B:\PellesC\Include\Win\specstrings.h(11): fatal error #1035: Can't find include file <sal.h>.
*** Error code: 1 ***

John
Hi John,
the header sal.h is in the patch as a file to add (if you look in diffs.txt you'll see it). I have to check why the patch utility doesn't create it. Maybe I missed a switch.
Thanks for the feedback, The cut version that should be added has been posted by Timo. I created it because I can't distribuite something from MS  ;D (win sdk doesn't have it!).

64bit
B:\PellesC\Include\Win\winnt.h(898): warning #2195: Unrecognized intrinsic function: '_rotl8'.
B:\PellesC\Include\Win\winnt.h(899): warning #2195: Unrecognized intrinsic function: '_rotl16'.
B:\PellesC\Include\Win\winnt.h(900): warning #2195: Unrecognized intrinsic function: '_rotr8'.
B:\PellesC\Include\Win\winnt.h(901): warning #2195: Unrecognized intrinsic function: '_rotr16'.
    ...................................
B:\PellesC\Include\Win\winbase.h(2218): warning #2195: Unrecognized intrinsic function: '_InterlockedAnd64'.
B:\PellesC\Include\Win\winbase.h(2219): warning #2195: Unrecognized intrinsic function: '_InterlockedOr64'.
B:\PellesC\Include\Win\winbase.h(2220): warning #2195: Unrecognized intrinsic function: '_InterlockedXor64'.

John
PellesC doesn't seems to have them  :(
I'll modify patch for this also.
« Last Edit: April 27, 2014, 10:49:26 PM by frankie »
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: Using MS standard headers on PellesC
« Reply #89 on: April 27, 2014, 11:48:16 PM »
I modified the patch to be sure that sal.h is created  :(
On my system it works, please let me know if there are still problems. Maybe patch utility have still some bugs  >:(

For the warnings I'll fix the headers as soon as I'll have time... :P
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide