public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Bug in CYGWIN's UUID library: GUID_NULL not found.
@ 2023-02-20 15:48 Carlo B.
  2023-02-20 16:01 ` Takashi Yano
  0 siblings, 1 reply; 3+ messages in thread
From: Carlo B. @ 2023-02-20 15:48 UTC (permalink / raw)
  To: The Cygwin Mailing List

Hello,
I think that there is a bug into the uuid library, the one to be used
with the W32API for the POSIX core.
Please have a look to the following tiny test code:

//====================
#include <windows.h>
#include <initguid.h>
#include <ks.h>
#include <stdio.h>

int main()
{
    printf("GUID_NULL=\"%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X\"\n",
        GUID_NULL.Data1,
        GUID_NULL.Data2, GUID_NULL.Data3,
        GUID_NULL.Data4[0], GUID_NULL.Data4[1],
        GUID_NULL.Data4[2], GUID_NULL.Data4[3],
        GUID_NULL.Data4[4], GUID_NULL.Data4[5],
        GUID_NULL.Data4[6], GUID_NULL.Data4[7]
    );

    return 0;
}
//====================

Compiling it with x86_64-pc-cygwin or i686-pc-cygwin does not work:

$ gcc e.c -o e.exe -luuid
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld:
/tmp/ccyJK3d9.o:e.c:(.rdata$.refptr.GUID_NULL[.refptr.GUID_NULL]+0x0):
undefined reference to `GUID_NULL'
collect2: error: ld returned 1 exit status

But it works fine when using MinGW-w64 compilers:

$ x86_64-w64-mingw32-gcc e.c -o e.exe -luuid

$ ./e.exe
GUID_NULL="00000000-0000-0000-0000-000000000000"


I discovered this issue when making a new FluidSynth package for
CYGWIN for my repository of packages.
Can you confirm it?
Thank you very much for your time.

Sincerely,

Carlo Bramini.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-20 16:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-20 15:48 Bug in CYGWIN's UUID library: GUID_NULL not found Carlo B.
2023-02-20 16:01 ` Takashi Yano
2023-02-20 16:12   ` Carlo B.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).