Quantcast

Possible error in ntddstor.h

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Possible error in ntddstor.h

Anton Shepelev
Hello, all

When  trying  to  buid DOSBox in a freshly-installed
MinGW, I am having this error:

  macro "__IOCTL_STORAGE_" requires 3 arguments, but only 2 given

in the file

  MinGW\include\ddk\ntddstor.h

which has:

  #define __IOCTL_STORAGE_(FN,M,A)       CTL_CODE(IOCTL_STORAGE_BASE,(FN),(M),(A))
  [...]
  #define IOCTL_STORAGE_EJECT_MEDIA    __IOCTL_STORAGE_(0x0202,__FILE_RD_BUFFERED)

i.e. the macro definition does not match its invoca-
tion.   Is  it an error in MinGW?  The file's intro-
ductory comment contains this line:

   * $Id: ntddstor.h,v ed94503bab84 2016/05/04 19:34:24 keithmarshall $

--
()  ascii ribbon campaign - against html e-mail
/\  http://preview.tinyurl.com/qcy6mjc [archived]


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Possible error in ntddstor.h

Keith Marshall
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 19/07/16 22:30, Anton Shepelev wrote:
> [...] I am having this error:
>
> macro "__IOCTL_STORAGE_" requires 3 arguments, but only 2 given

Okay, I can reproduce this.

> in the file
>
> MinGW\include\ddk\ntddstor.h
>
> which has:
>
> #define __IOCTL_STORAGE_(FN,M,A)
> CTL_CODE(IOCTL_STORAGE_BASE,(FN),(M),(A)) [...] #define
> IOCTL_STORAGE_EJECT_MEDIA
> __IOCTL_STORAGE_(0x0202,__FILE_RD_BUFFERED)
>
> i.e. the macro definition does not match its invocation.

It would, if __FILE_RD_BUFFERED was appropriately expanded, to match
*its* definition, in <ddk/winddk.h>:

  #define __FILE_RD_BUFFERED  METHOD_BUFFERED, FILE_READ_ACCESS

Alas, the C preprocessor doesn't expand this macro in time for it to
have the desired effect.

> Is it an error in MinGW?

Yes, (specific to w32api-3.18), and it affects rather more than just
this one case.  Please file a formal bug report, on the bug tracker,
so that I have an appropriately attributable point of reference for
the necessary follow up.

- --
Regards,
Keith.

Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQIcBAEBAgAGBQJXj1vjAAoJEMCtNsY0flo/Hg4P/RSu38y9IT7QBNjVgIQB7pzt
d8ZrKiUtVdIFVoRmUgusf8ZwM63pxMFZ8FyjxXaS4omlolcNIpIBzGaQjimY0X75
oxRkCemks5T1WT0gyxMqFMZtoQosNvp11sCg8d1/PIbtJcnMMjDTjudOaWC0Ahj0
WDLx7NF83vM9mG6pIQas3PODEPECFAMLzlqDIJK1Vxx5RCS66PUksiWJn9df05HN
18EyGFfQhO+nt/1TDtNvNvp9Q+66jZfXg295n0FC6zUZXksQnhroJjt8QeHfzbrD
eK88wFjgCTfq8VoI8pVfQ9Czmt8h9+oZzuiVUCusnMGHhEJvETFynqkjHv6TSgma
3y8SI57/qUTOakqeOj0GH2PZhZ8FJQyAmEdbdin3pxWr/8xqmfN3QY+sdeH3IFUg
UYKYXKR0aFXLmQHw2wpSk0e96MRhZGd+884TEHQItJNZyOrA0JlloOJbhvAgjJn9
setMvNwWCVfcMBMIDbOu7szc0aL3MoqTipnjEEwlQFd7bD8ONaDnApjDhbCRH+W7
gm6jTXXahwiZ0HlLDyIo9pwBg9Chghpw8cNCO+Szmz+CiHtTkdoB1w/SWATfIEU4
7XI27183t/UVrxYUwNCplnHpxSnMiUROkDW9MtYW+frz7cuvSAbjyIZv8kt62TK7
+YkVqbR/vHoe9O3txygf
=TI3z
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Possible error in ntddstor.h

Anton Shepelev
Keith Marshall:

>Anton Shepelev:
>
>>When trying to buid DOSBox in a freshly-installed
>>MinGW, I am having this error:
>>macro "__IOCTL_STORAGE_" requires 3 arguments, but only 2 given
>
>Okay, I can reproduce this.
>[...]
>Please  file a formal bug report, on the bug track-
>er, so that I have  an  appropriately  attributable
>point of reference for the necessary follow up.

I not being conversant in either C or C++, could you
please tell me what would a minimal  test  case  be,
for  I  only  saw the error while compiling the huge
3rd-party project that DOSBox  is?   What  should  I
feed gcc -- the lone .h file?

I  will  file  a bug report upon returning home from
work.

--
()  ascii ribbon campaign - against html e-mail
/\  http://preview.tinyurl.com/qcy6mjc [archived]


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Possible error in ntddstor.h

Keith Marshall
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 20/07/16 12:25, Anton Shepelev wrote:

> Keith Marshall:
>> Anton Shepelev:
>>
>>> When trying to buid DOSBox in a freshly-installed MinGW, I am
>>> having this error: macro "__IOCTL_STORAGE_" requires 3
>>> arguments, but only 2 given
>>
>> Okay, I can reproduce this. [...] Please  file a formal bug
>> report, on the bug track- er, so that I have  an  appropriately
>> attributable point of reference for the necessary follow up.
>
> I not being conversant in either C or C++, could you please tell me
> what would a minimal  test  case  be, for  I  only  saw the error
> while compiling the huge 3rd-party project that DOSBox  is?   What
> should  I feed gcc -- the lone .h file?

I reproduced it with:

  $ cat fubar.c
  #define _XOPEN_SOURCE  700

  #include <stdio.h>
  #include <winioctl.h>

  int main()
  { printf( "IOCTL_STORAGE_EJECT_MEDIA = %1$08d (0x%1$08X)\n",
        IOCTL_STORAGE_EJECT_MEDIA
      );
    return 0;
  }

  $ gcc fubar.c

> I  will  file  a bug report upon returning home from work.

Thanks.  I already have a good idea how to fix it, so I'll attend
to it, and publish an update once I have your formal bug report for
reference.  As an aside, that test case also revealed a bug which
has crept into our printf() implementation; I'll file my own report
for that.

- --
Regards,
Keith.

Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQIcBAEBAgAGBQJXj2Y5AAoJEMCtNsY0flo/z8sP/18Q+4xrg9j9U+ipG/ZVpMPA
H3T/3qOtj0CvpXxGGJ8mM1HeuHkpUTH+de6JcfftSCUfHzXFaz50367Kpshbi6/+
Ms5/L4y98ejCMZz+NXeyUgxp187IyqI+SaI7VQWk2bESKnz/NBIcEBcReHoZWtzu
owccHUIwAkcGFH4Vo+EQ8aWlCiE1bk6EVm6pCNmvEJ5OzWDha+rhDjkWmAxbEmo3
Z84wChD6Eee4fn9x/O8dupki3fAsVyQXQUxXfAEEVee1UPNm+EOyC0ZAxFY4FmLX
oU63wULBt0rJVjVf8SZik/F9cZSMRKE1qpwM3j9zTazmadznqxGGLmQXNuWnhIxD
GySQrPXACX4dnlukkWXGUIBOf10K9dXAS6pUa2zhAcE9s1MXRiitpFDHJEvgQILW
qrVr5pCIAWOX/BfK5XqSSX/SofztfwekA8A5/PBhaM7JKIOch6b39tN1nbkN210j
Sy47eYnjQ1eCQAsaAcOwrpsGVkT1nVNb/HzmAeOg2Is4/5EXRnwcVe5pEw9f/AyP
yOAkpCckH5nJnsWgqL8XpxihZnYTd2C3uWSH3btOIog6kbUJSVRXcCg29nUizBD+
ydY67LsFNdGM1gRFM4dGTyTx+NfnCJqj1FLhA3TCt+gkYAFJXF/lH8CUqOJ0UOyq
gTFYDlE6Vk+8CeyFp7By
=7L+X
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Possible error in ntddstor.h

Anton Shepelev
In reply to this post by Keith Marshall
Keith Marshall:

> Please file a formal bug report, on the bug track-
> er, so that I have an  appropriately  attributable
> point of reference for the necessary follow up.

Bug report created:
https://sourceforge.net/p/mingw/bugs/2307/

--
()  ascii ribbon campaign - against html e-mail
/\  http://preview.tinyurl.com/qcy6mjc [archived]


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Possible error in ntddstor.h

Keith Marshall
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 20/07/16 20:38, Anton Shepelev wrote:
> Keith Marshall:
>
>> Please file a formal bug report, on the bug tracker, so that I
>> have an appropriately attributable point of reference for the
>> necessary follow up.
>
> Bug report created: https://sourceforge.net/p/mingw/bugs/2307/

Thanks.  Fixed by:
https://sourceforge.net/p/mingw/mingw-org-wsl/ci/6313c67b9e29285e06cf02b4fee8b29fd81f6df6/

Please look out for upcoming w32api-3.18.1 release, for delivery of
the resolution.

For completeness, this...
> As an aside, that test case also revealed a bug which has crept
> into our printf() implementation; I'll file my own report for
> that.

is https://sourceforge.net/p/mingw/bugs/2307/, fixed by combination of:
https://sourceforge.net/p/mingw/mingw-org-wsl/ci/76be37ae450b3e24c2deda9348954b79c2291b03/
https://sourceforge.net/p/mingw/mingw-org-wsl/ci/7a511c73f74aae29157a66c02304be61844606d4/

to be included in upcoming mingwrt-3.22.1 release.

- --
Regards,
Keith.

Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQIcBAEBAgAGBQJXlOceAAoJEMCtNsY0flo/UMYP/3IepSp9GO4NjKndKIHdz/lc
2GphSEj2WPuV+9bGzmt2VIdD7N5Q6wevjdmqBsmR65TH7pETfiCQRz93HK9msEsv
b0UpbEXtjT3S9HkhVomGn5ZkNKMb8THMKoeT7s2xq7MMS3ygOVyf23y8hNWO74va
h2TXdOn+7qB+EThp0ikw2SlFQvSrg2x1ljyYfbAM3cRphOGBkYTQo82/S9f9Ka77
pERWTYFS0vwauJrThSPzwrVc5beJRseYM1tcCthis4bQjAtY4z+oJGbzq2ijldWF
yFPkvUm69eloSrQD3BQ1hB9HGoL13CGoN1domMXpUbfWWQfIf1hBeGLNSxaiDaac
4gLF7e0ncVhLv+E7tFljpczm0k7c4StzChEFib3k6JVafprBlsdXkKNQ418IzgE6
V/GMwe1bJjx9odar/fxsDbvVJ82u5wghZDyMb+1LLnjlqS9b/GgZgIDi6oNafN1R
TWICxzzI/HNfNQ6jWcUI4hGalv9EDXltX7fMeiPxO0AlhxIgKEnn/H70wmmOJCmi
wu3UJOVvcb+IJo34nLXpwBPGz/r+gIafWmDH7AT+rMKsBn6MarCQSnzQZ4F1zuBB
JUe9tluGfUokr00cHSlen7TbiegnHYnBEQbPhNsnwWdJ66scRJeK6oR9EtiICE0s
fGENtsuyJR4l4yisou7Z
=sCcW
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Possible error in ntddstor.h

Anton Shepelev
Keith Marshall to Anton Shepelev:

> > Bug report created:
> > https://sourceforge.net/p/mingw/bugs/2307/
>
> Thanks.  Fixed by:
> https://sourceforge.net/p/mingw/mingw-org-wsl/ci/6313c67b9e29285e06cf02b4fee8b29fd81f6df6/
>
> Please  look  out  for  upcoming w32api-3.18.1 re-
> lease, for delivery of the resolution.

Thank you, Keith.  I will try to apply  the  patches
and,  failing  therein, will wait for the binary up-
date.

--
()  ascii ribbon campaign - against html e-mail
/\  http://preview.tinyurl.com/qcy6mjc [archived]


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Possible error in ntddstor.h

Anton Shepelev
I wrote:

> Keith Marshall to Anton Shepelev:
>
> > > Bug report created:
> > > https://sourceforge.net/p/mingw/bugs/2307/
> >
> > Thanks.  Fixed by:
> > https://sourceforge.net/p/mingw/mingw-org-wsl/ci/6313c67b9e29285e06cf02b4fee8b29fd81f6df6/
> >
> > Please  look  out for upcoming w32api-3.18.1 re-
> > lease, for delivery of the resolution.
>
> Thank you, Keith.  I will try to apply the pathces
> and, failing therein, will wait for the binary up-
> date.

I hereby confirm that the problem is gone.

--
()  ascii ribbon campaign - against html e-mail
/\  http://preview.tinyurl.com/qcy6mjc [archived]


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Possible error in ntddstor.h

Keith Marshall
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 24/07/16 21:37, Anton Shepelev wrote:
>>> Please  look  out for upcoming w32api-3.18.1 re- lease, for
>>> delivery of the resolution.
>>
>> Thank you, Keith.  I will try to apply the pathces and, failing
>> therein, will wait for the binary up- date.
>
> I hereby confirm that the problem is gone.

Thanks.  The w32api-3.18.1 release is now published; upgrade via
mingw-get will be available, once the SF mirrors resynchronize.

The corresponding upgrade to mingwrt-3.22.1 remains pending.

- --
Regards,
Keith.

Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQIcBAEBAgAGBQJXlTBGAAoJEMCtNsY0flo/O9kQAJ+6R2NpyRui6k+pnHQi/ICM
yeB+DOLCt1krRLedacBgWlpRBbxH1jmaNSd9Qlh/GBePnxLsJ7aCyI2legbWYB2j
zuuGjrXBRH55wUnCLSvw8phkciEMVYF1ef6YV7g6rgeoeGC/oS+wZPBD7WJcxsa9
5aBldoitPrgcxS4aXQ1YGGPEiiG5jspT7aDLQE3H528d1ONaaTFDZSyLrTrLTqJX
PpoM5z9Y1dugJ+ic0o1PYqTECQF75ScrRFOjaXZCeyGqz6mNeaaUmNoQnlA+eKUY
s/PwMPIo3euGYBccwZzoklhN66bNGKPzHPPaJI49/BR+wWNyM9U4pK3cD8UBG3gP
YvlpLxLNB+UbgajrZe1sjhL9NxLy1c4f6rmzKXCANoXo/UjkNRwAgDhsyIkomuXt
Qecu71h48bLcSGSfuBy8JT5YULVFnLeVeJuAQhBfD+ma1aIiGgCEWeBsEIjKyy/P
n5tIC7eeBFy4ub1LNEgb8RMSlCBWvQVyLXsxpJch88ojoPhwRnd2rcycZAkZVBg9
zllr0Z7Mlnj6QRa4Kk3yFPZm+Xux66ZOXB/Jmpbiq9tcdz8R1O1PNcc8+biN4Rp0
Dh/UH504wLzG+y9HoxWDD1Ob7iB/zn9S2J0Wiykc95AZtonDZEcU3llhypq1BSb+
0TGvPVgStZchgKs3NjMy
=+rot
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Loading...