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

Use functions, ending with _utf8 under Windows #177

Merged
merged 1 commit into from May 27, 2017

Conversation

Projects
None yet
2 participants
@EPashkin
Member

EPashkin commented May 26, 2017

Part of gtk-rs/gir#375

@EPashkin

This comment has been minimized.

Show comment
Hide comment
@EPashkin

EPashkin May 26, 2017

Member

@GuillaumeGomez, @sdroege I need you option:

  1. MSYS2 mingw64/mingw-w64-x86_64-glib2 2.52.2-1 don't have _utf8 version for 4 functions
d:\eap\rust\0\./target\debug\deps\glib-69e7bba60aa93509.glib-utils.o: In function `glib::utils::get_user_name':
d:\eap\rust\0\glib/src/utils.rs:81: undefined reference to `g_get_user_name_utf8'
d:\eap\rust\0\./target\debug\deps\glib-69e7bba60aa93509.glib-utils.o: In function `glib::utils::get_real_name':
d:\eap\rust\0\glib/src/utils.rs:92: undefined reference to `g_get_real_name_utf8'
d:\eap\rust\0\./target\debug\deps\glib-69e7bba60aa93509.glib-utils.o: In function `glib::utils::get_home_dir':
d:\eap\rust\0\glib/src/utils.rs:141: undefined reference to `g_get_home_dir_utf8'
d:\eap\rust\0\./target\debug\deps\glib-69e7bba60aa93509.glib-utils.o: In function `glib::utils::get_tmp_dir':
d:\eap\rust\0\glib/src/utils.rs:152: undefined reference to `g_get_tmp_dir_utf8'

same with g_find_program_in_path but it don't fails on lib test, only on usage attempt.

By https://github.com/GNOME/glib/blob/master/glib/gutils.c#L2315 these function don't have suffix on win64 (and only these in glib)
So I used #[cfg(all(windows,target_arch="x86"))] and #[cfg(not(all(windows,target_arch="x86")))]

Member

EPashkin commented May 26, 2017

@GuillaumeGomez, @sdroege I need you option:

  1. MSYS2 mingw64/mingw-w64-x86_64-glib2 2.52.2-1 don't have _utf8 version for 4 functions
d:\eap\rust\0\./target\debug\deps\glib-69e7bba60aa93509.glib-utils.o: In function `glib::utils::get_user_name':
d:\eap\rust\0\glib/src/utils.rs:81: undefined reference to `g_get_user_name_utf8'
d:\eap\rust\0\./target\debug\deps\glib-69e7bba60aa93509.glib-utils.o: In function `glib::utils::get_real_name':
d:\eap\rust\0\glib/src/utils.rs:92: undefined reference to `g_get_real_name_utf8'
d:\eap\rust\0\./target\debug\deps\glib-69e7bba60aa93509.glib-utils.o: In function `glib::utils::get_home_dir':
d:\eap\rust\0\glib/src/utils.rs:141: undefined reference to `g_get_home_dir_utf8'
d:\eap\rust\0\./target\debug\deps\glib-69e7bba60aa93509.glib-utils.o: In function `glib::utils::get_tmp_dir':
d:\eap\rust\0\glib/src/utils.rs:152: undefined reference to `g_get_tmp_dir_utf8'

same with g_find_program_in_path but it don't fails on lib test, only on usage attempt.

By https://github.com/GNOME/glib/blob/master/glib/gutils.c#L2315 these function don't have suffix on win64 (and only these in glib)
So I used #[cfg(all(windows,target_arch="x86"))] and #[cfg(not(all(windows,target_arch="x86")))]

@EPashkin

This comment has been minimized.

Show comment
Hide comment
@EPashkin

EPashkin May 26, 2017

Member
  1. I reexported utils::* and hide mod utils
Member

EPashkin commented May 26, 2017

  1. I reexported utils::* and hide mod utils

@EPashkin EPashkin changed the title from WIP: Use functions, ending with _utf8 under Windows to Use functions, ending with _utf8 under Windows May 27, 2017

@EPashkin

This comment has been minimized.

Show comment
Hide comment
@EPashkin

EPashkin May 27, 2017

Member

@GuillaumeGomez please look at this

Member

EPashkin commented May 27, 2017

@GuillaumeGomez please look at this

@GuillaumeGomez

This comment has been minimized.

Show comment
Hide comment
@GuillaumeGomez

GuillaumeGomez May 27, 2017

Member

Awesome, thanks!

Member

GuillaumeGomez commented May 27, 2017

Awesome, thanks!

@GuillaumeGomez GuillaumeGomez merged commit a4e2fba into gtk-rs:master May 27, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@EPashkin EPashkin deleted the EPashkin:windows_functions branch May 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment