Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Conversation

@jkotas
Copy link
Member

@jkotas jkotas commented Feb 9, 2019

No description provided.

@jkotas jkotas force-pushed the dllexport branch 3 times, most recently from 667ad60 to f45df99 Compare February 9, 2019 20:34
@jkotas
Copy link
Member Author

jkotas commented Feb 9, 2019

@dotnet-bot test OSX10.12 x64 Checked Innerloop Build and Test please

@jkotas jkotas changed the title WIP: Cleanup DLL exports Cleanup DLL exports Feb 9, 2019
@jkotas
Copy link
Member Author

jkotas commented Feb 10, 2019

Addressing #21924 (comment)

cc @janvorli @mikedn @am11

@jkotas
Copy link
Member Author

jkotas commented Feb 10, 2019

@dotnet-bot test OSX10.12 x64 Checked Innerloop Build and Test please

#ifndef PAL_STDCPP_COMPAT

PALIMPORT DLLEXPORT void __cdecl qsort(void *, size_t, size_t, int(__cdecl *)(const void *, const void *));
PALIMPORT DLLEXPORT void * __cdecl bsearch(const void *, const void *, size_t, size_t,
Copy link
Member

@am11 am11 Feb 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could these be PALIMPORT PALAPI <retunType> bsearch/qsort/getenv/_putenv(.., as PALAPI is defined as DLLEXPORT __cdecl?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pattern used to export C-runtime APIs is PALIMPORT DLLEXPORT, so I kept this one for consistency.

C-runtime APIs were not PALAPIs originally when we had a thin (just forwarders) PAL layer for Windows as well. On Windows, the C-runtime APIs were cdecl, but PALAPIs were stdcall.

@jkotas jkotas merged commit 70cf6d4 into dotnet:master Feb 10, 2019
@jkotas jkotas deleted the dllexport branch February 10, 2019 22:55
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants