Permalink
Commits on Nov 15, 2012
  1. [WIP] Fix Python shebang lines.

    dieterv committed Feb 3, 2012
    This avoids using a hard-coded value for the shebang, as
    previously discussed in bug #650763.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=658237
  2. win32: fix gdbus-codegen

    dieterv committed Oct 18, 2012
    Commit 05461e5 moved the
    codegen package from lib/gdbus-2.0 to share/glib-2.0. Adjust
    the win32 "relocation" aware patch accordingly.
  3. configure.ac: properly quote AC_MSG_CHECKING

    dieterv committed Oct 2, 2012
    Not really requered but it doesn't hurt either.
  4. win32: fix libtool: link: warning: undefined symbols not allowed in i…

    dieterv committed Oct 1, 2012
    …686-pc-mingw32 shared libraries
    
    libtool: link: warning: undefined symbols not allowed in i686-pc-mingw32 shared libraries
    libtool: link: ar cru .libs/libresourceplugin.a  .libs/resourceplugin.o .libs/plugin_resources.o
    libtool: link: ranlib .libs/libresourceplugin.a
    libtool: link: ( cd ".libs" && rm -f "libresourceplugin.la" && cp -p "../libresourceplugin.la" "libresourceplugin.la" )
  5. win32: remove old "locale encoded filename parameter" dll abi compati…

    dieterv committed Oct 1, 2012
    …bility exports
    
    All code compiled agains GLib 2.6 uses the utf8() variants.
    The dll abi compatibility non-utf8() variants where only provided
    with 32-bit builds. Unfortunately, abi has been broken on at
    least one location so we are pretty sure binaries compiled agains
    a GLib version older than 2.6 will not work with current GLib
    binaries at all. So there is no longer a reason to export these
    at all.
    
    Make sure code compiled from now on stops using the _utf8 suffixed
    versions and alias _utf8 versions so binaries compiled agains GLib 2.6
    up until this commit continue working.
    
    As a side-effect, this fixes an introspection bug on win32 where
    only the _utf8 versions where available in the typelibs. Meaning
    code written on Linux (which never had the _utf8 suffix for these
    functions to begin with) didn't work on Windows.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=620566
    https://bugzilla.gnome.org/show_bug.cgi?id=673312
  6. tests: fix gobject performance tests

    dieterv committed Oct 8, 2012
    The performance tests use GTimer which internally uses
    g_get_monotonic_time, which at least on Windows has
    a pretty bad resolution: depending on the configuration
    of the system, the wall clock time is updated as infrequently
    as 64 times a second (which is approximately every 16ms).
    
    For starters let's ask Windows for a higher timer
    resolution (see g_get_monotonic_time comments in
    gmain.c for more info).
    
    However, it is still possible for min_elapsed to be zero.
    In the common case this leads to a division by zero:
      factor = TARGET_ROUND_TIME / min_elapsed;
    
    or when GLib has been compiled with -D__USE_MINGW_ANSI_STDIO=1,
    factor ends up being inf, which is then passed into test
    initialisation code which is trying to do the equivalent of:
      n = 10000 * inf
      data->objects = g_new (GObject *, n);
    
    Work around these issues by setting min_elapsed = 0.001
    whenever is would have been zero otherwise.
  7. tests: fix tests/run-collate-tests.sh exit status

    dieterv committed Sep 21, 2012
    This ensures automake's script based test suite support writes:
      No suitable locale, skipping test
      SKIP: run-collate-tests.sh
    instead of:
      No suitable locale, skipping test
      PASS: run-collate-tests.sh
    
    Refer to http://www.gnu.org/software/automake/manual/automake.html#Scripts_002dbased-Testsuites
    for more information.
  8. win32: fix constness in win_iconv.c

    dieterv committed Sep 19, 2012
    warning: passing argument 2 of 'iconv' from incompatible pointer type [enabled by default]
    note: expected 'const char **' but argument is of type 'gchar **'
    
    See upstream bug:
    http://code.google.com/p/win-iconv/issues/detail?id=8&can=1
  9. win32: fix assert-msg-test

    dieterv committed Sep 17, 2012
    On windows, libtool install a wrapper executable in "$(builddir)"
    which is capable of correctly executing the real (and uninstalled)
    executable living in "$(builddir)/.libs". We have to ensure
    $msg_test points to the wrapper executable if it exists.
    
    Additionally, g_assert() eventually calls g_assertion_message()
    which calls abort(). msvcrt's abort() immediately exits the process
    with this well known message:
    
      $ assert-msg-test.exe
      **
      ERROR:c:/dev/gnome.org/gnome-windows/checkout/glib/git/src/tests/assert-msg-test.c:7:main: assertion failed: (42 < 0)
    
      This application has requested the Runtime to terminate it in an unusual way.
      Please contact the application's support team for more information.
    
    and presents the user with a "assert-msg-test.exe has stopped working"
    dialog box. The message does not belong in the build output as all
    we care about is "PASS: run-assert-msg-test.sh". The dialog currently
    prevents the test suite to be run unattended (think build bots).
    Calling SetErroMode() with the appropriate flags fixes both issues.
    
    Additionally, the abort() call exits the application outside the
    control of MinGW's gdb, so when we want to print the value of
    (char*) __glib_assert_msg as is done in run-assert-msg-test.sh,
    the process has already been torn down, the stack is gone and
    we're basically left with nothing:
    
      $ libtool --mode=execute gdb --batch --ex run --ex "set print elements 0" --ex "print (char*) __glib_assert_msg" assert-msg-test.exe 2> /dev/null
      [New Thread 4384.0x130]
      [Inferior 1 (process 4384) exited with code 03]
      $1 = 0x0
    
    However, adding a breakpoint on abort() does allow us to get at the value
    of (char*) __glib_assert_msg:
    
      $ libtool --mode=execute gdb --batch --ex "break abort" --ex run --ex "set print elements 0" --ex "print (char*) __glib_assert_msg" assert-msg-test.exe 2> /dev/null
      Breakpoint 1 at 0x401b34
      [New Thread 8116.0x16b4]
    
      Breakpoint 1, 0x68675524 in abort () from c:\dev\gnome.org\gnome-windows\checkout\glib\git\build\glib\.libs\libglib-2.0-0.dll
      $1 = 0x3a21b0 "ERROR:c:/dev/gnome.org/gnome-windows/checkout/glib/git/src/tests/assert-msg-test.c:7:main: assertion failed: (42 < 0)"
    
    Doing so finally makes the test pass on windows.
  10. win32: fix glib/gwin32.c:481:3: warning: 'g_win32_get_package_install…

    dieterv committed Sep 11, 2012
    …ation_directory' is deprecated (declared at c:/dev/gnome.org/gnome-windows/checkout/glib/git/src/glib/gwin32.c:397): Use 'g_win32_get_package_installation_directory_of_module' instead [-Wdeprecated-declarations]
  11. win32: fix glib/gwin32.c:62:3: warning: implicit declaration of funct…

    dieterv committed Sep 11, 2012
    …ion '_chsize' [-Wimplicit-function-declaration]
  12. win32: fix glib/gnulib/vasnprintf.c:732:11: warning: variable 'retcou…

    dieterv committed Sep 12, 2012
    …nt' set but not used [-Wunused-but-set-variable]
  13. win32: add missing g_content_type_get_symbolic_icon and

    dieterv committed Sep 10, 2012
    g_content_type_get_generic_con_name  definitions
  14. win32: remove unused _WIN32_WINDOWS define

    dieterv committed May 10, 2012
    As GLib has not supported windows 9x for a long time, this
    is safe to remove.
  15. win32: cosmetic fixes in g_get_prgname()

    dieterv committed Aug 16, 2012
    use buffer instead of buf.
  16. win32: remove private get_special_folder()

    dieterv committed Apr 24, 2012
    which is no longer being used.
  17. win32: fix g_get_system_config_dirs()

    dieterv committed Apr 24, 2012
        - first check XDG_CONFIG_DIRS and fall back to CSIDL_COMMON_APPDATA
        - use FOLDERID_ProgramData equivalent of CSIDL_COMMON_APPDATA on
          Vista or newer
  18. win32: fix g_get_system_data_dirs()

    dieterv committed Apr 24, 2012
    - first check XDG_DATA_DIRS and fall back to CSIDL_COMMON_APPDATA
    - use FOLDERID_ProgramData equivalent of CSIDL_COMMON_APPDATA on
      Vista or newer
  19. g_get_user_special_dir(): move load_user_special_dirs() code...

    dieterv committed Apr 24, 2012
    ... for all supported platforms together, getting rid of a no
    longer needed forward declaration at the same time.
  20. win32: fix g_get_user_special_dir()

    dieterv committed Apr 20, 2012
    - G_USER_DIRECTORY_DESKTOP:
        use FOLDERID_Desktop equivalent of CSIDL_DESKTOPDIRECTORY on Vista
        or newer. Note that the fallback to "g_home_dir()\Desktop" doesn't
        make sense on windows so it has been "#ifndef G_OS_WIN32" out.
    - G_USER_DIRECTORY_DOCUMENTS:
        use FOLDERID_Documents equivalent of CSIDL_PERSONAL on Vista
        or newer
    - G_USER_DIRECTORY_DOWNLOAD:
        use FOLDERID_Downloads on Vista or newer, CSIDL_DESKTOPDIRECTORY
        otherwise
    - G_USER_DIRECTORY_MUSIC:
        use FOLDERID_Music equivalent of CSIDL_MYMUSIC on Vista or newer
    - G_USER_DIRECTORY_PICTURES:
        use FOLDERID_Pictures equivalent of CSIDL_MYPICTURES on Vista
        or newer
    - G_USER_DIRECTORY_PUBLIC_SHARE:
        use FOLDERID_Public on Vista or newer. Note that FOLDERID_Public
        is not really the equivalent of CSIDL_COMMON_DOCUMENTS (that
        would be FOLDERID_PublicDocuments). But looking at how
        FOLDERID_Public is intended to be used, it is a better fit.
    - G_USER_DIRECTORY_TEMPLATES:
        use FOLDERID_Templates equivalent of CSIDL_TEMPLATES on
        Vista or newer. Note that FOLDERID_Templates points inside
        %APPDATA% (C:\Users\dieterv\AppData\Roaming) and there is no
        %LOCALAPPDATA% (C:\Users\dieterv\AppData\Local) equivalent.
        Not a big deal really, just less ideal...
    - G_USER_DIRECTORY_VIDEOS:
        use FOLDERID_Videos equivalent of CSIDL_MYVIDEO on Vista or newer
  21. win32: fix g_get_user_runtime_dir()

    dieterv committed Apr 20, 2012
    - first check XDG_RUNTIME_DIR and fall back to g_get_tmp_dir()
  22. win32: fix g_get_user_cache_dir()

    dieterv committed Aug 16, 2012
    - use CSIDL_LOCAL_APPDATA instead of CSIDL_INTERNET_CACHE
    - first check XDG_CACHE_HOME and fall back to CSIDL_LOCAL_APPDATA
    - use FOLDERID_LocalAppData equivalent of CSIDL_LOCAL_APPDATA on
      Vista or newer
  23. win32: fix g_get_user_config_dir()

    dieterv committed Aug 16, 2012
    - first check XDG_CONFIG_HOME and fall back to CSIDL_LOCAL_APPDATA
    - use FOLDERID_LocalAppData equivalent of CSIDL_LOCAL_APPDATA on
      Vista or newer
  24. win32: fix g_get_user_data_dir()

    dieterv committed Apr 19, 2012
    - first check XDG_DATA_HOME and fall back to CSIDL_LOCAL_APPDATA.
    - use FOLDERID_LocalAppData equivalent of CSIDL_LOCAL_APPDATA on
      Vista or newer
  25. win32: fix g_get_home_dir()

    dieterv committed Apr 19, 2012
    - don't check %HOME% which does not exist on win32 (%HOMEDRIVE%
      and %HOMEPATH% do)
    - don't check get_windows_directory_root() as it does not make
      sense: a user (ie member of the built-in Users group) does not
      necesarally have permissions to that location.
    - use FOLDERID_Profile equivalent of CSIDL_PROFILE on Vista or newer
  26. win32: add private _g_win32_get_known_folder() function

    dieterv committed Aug 16, 2012
    _g_win32_get_known_folder() will replace the currently used
    win32 specific get_special_folder implementation and the
    mess in load_user_special_dirs().
  27. win32: use GetTempPath for g_tmp_dir

    dieterv committed Apr 19, 2012
    %TMPDIR%, %TMP%, %TEMP% and get_windows_directory_root() were
    checked in that order. However, on both XP an 7 %TMPDIR% does
    not exist. Also, this behavior does not correspond with GetTempPath()
    which returns one of %TMP%, %TEMP%, %USERPROFILE% or the Windows
    directory (not the same as get_windows_directory_root()!), checked
    in that order.
    
    So simply use GetTempPath() instead.
  28. win32: remove "windows directory root" fallbacks for g_tmp_dir and g_…

    dieterv committed Feb 6, 2012
    …home_dir
    
    g_tmp_dir: GetTempPath() behavior is documented to return one
               of %TMP%, %TEMP%, %USERPROFILE% or the Windows
               directory (C:\Windows).
    g_home_dir: better alternatives are already searched (CSIDL_PROFILE
                and %USERPROFILE%, for example).
    
    The "windows directory root" (C:\) is not a good choice for these
    as there is a good chance a user will not have write permissions
    for that location with newer NT class Windows versions.