Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] Support uuid_generate_random (in uuid/uuid.h) #12093

Open
vadimkantorov opened this issue Sep 1, 2020 · 8 comments · May be fixed by #12430
Open

[feature request] Support uuid_generate_random (in uuid/uuid.h) #12093

vadimkantorov opened this issue Sep 1, 2020 · 8 comments · May be fixed by #12430

Comments

@vadimkantorov
Copy link

vadimkantorov commented Sep 1, 2020

This makes fontconfig compilation fail and was also noted in dotnet/corert#4624

Maybe an unsecure hack (behind an emcc option?) aliasing uuid_generate as uuid_generate_random could be provided?

Currently I patch it out with a define: CFLAGS=-Duuid_generate_random=uuid_generate

@kripken
Copy link
Member

kripken commented Sep 9, 2020

From the docs I think it would be acceptable to alias those (one may be more secure, but it doesn't have to be; also it looks like we do try to be as secure as possible already).

A PR adding an alias would be welcome! It could basically be a single line uuid_generate_random: 'uuid_generate' in src/library_uuid.js, unless there is some API difference as well.

@vadimkantorov
Copy link
Author

vadimkantorov commented Sep 20, 2020

Should it be sth like:

uuid_generate_random: function(u) {return this.uuid_generate(u);}

?
Would this. work there?

@vadimkantorov vadimkantorov changed the title uuid_generate_random from uuid/uuid.h seems unsupported [feature request] Support uuid_generate_random (in uuid/uuid.h) Sep 27, 2020
@kripken
Copy link
Member

kripken commented Oct 2, 2020

@vadimkantorov

You wouldn't use this, since these functions will all be top level functions.

But in the simple case where it's just an alias - so it just calls the other function, with the param, and returns the result, as you wrote - then uuid_generate_random: 'uuid_generate' should do exactly what you want, the JS library logic turns such a string into the code you wrote, automatically.

A PR would be great!

@vadimkantorov
Copy link
Author

vadimkantorov commented Oct 4, 2020

I created a PR with this proposed fix, but haven't tested it locally at all :(

@stale
Copy link

stale bot commented Apr 17, 2022

This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 30 days. Feel free to re-open at any time if this issue is still relevant.

@stale stale bot added the wontfix label Apr 17, 2022
@vadimkantorov
Copy link
Author

stale bump

@stale stale bot removed the wontfix label Apr 18, 2022
@rawsh
Copy link

rawsh commented Oct 28, 2022

bump
ran into this trying to compile poppler

@sbc100
Copy link
Collaborator

sbc100 commented Oct 29, 2022

The PR is open here #12430. We just asked for test to be written. Maybe you want to take a stab at it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants