This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi Alan, Thank you for the comments. Sorry about the formatting issues, here is an updated version of the patch. By the way, is there any formatting tool or official settings for tools like astyle or uncrustify? Best regards, Igor Kudrin ________________________________________ From: Alan Modra <amodra@gmail.com> Sent: Tuesday, July 26, 2016 7:00 PM To: Igor Kudrin Cc: binutils@sourceware.org; Nick Clifton Subject: Re: [PATCH][ld] Implement --build-id=uuid on MinGW/MSYS2. On Mon, Jul 25, 2016 at 10:15:34AM +0000, Igor Kudrin wrote: > +#else /* __MINGW32__ */ > + UUID uuid; > + typedef RPC_STATUS (RPC_ENTRY *UuidCreateFn)(UUID *Uuid); Formatting. Space before open parens of function args. typedef RPC_STATUS (RPC_ENTRY *UuidCreateFn) (UUID *Uuid); > + UuidCreateFn uuid_create = 0; > + > + HMODULE rpc_library = LoadLibrary("rpcrt4.dll"); Same. HMODULE rpc_library = LoadLibrary ("rpcrt4.dll"); > + if (!rpc_library) > + return FALSE; > + uuid_create = (UuidCreateFn)GetProcAddress(rpc_library, "UuidCreate"); Again, and space after cast. uuid_create = (UuidCreateFn) GetProcAddress (rpc_library, "UuidCreate"); and more below. > + if (!uuid_create) > + { > + FreeLibrary(rpc_library); > + return FALSE; > + } > + > + if (uuid_create(&uuid) != RPC_S_OK) > + { > + FreeLibrary(rpc_library); > + return FALSE; > + } > + FreeLibrary(rpc_library); > + memcpy(id_bits, &uuid, size < sizeof(UUID) ? size : sizeof(UUID)); > +#endif /* __MINGW32__ */ Other than the formatting issues, I really don't have enough familiarity with mingw to properly review the patch. So I'm passing the buck to Nick. -- Alan Modra Australia Development Lab, IBM
Attachment:
ld-build-id-uuid-2.patch.txt
Description: ld-build-id-uuid-2.patch.txt
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |