1. 20 Jun, 2018 1 commit
    • LRN's avatar
      W32: add std stream redirection envvar options · 460cc723
      LRN authored
      This commit adds two W32-only environmental variable checks:
      * G_WIN32_ALLOC_CONSOLE, if set to 1, will force glib to create
        a new console if the process has no console by itself.
        This option is for GUI apps that are launched from GUI
        processes, in which case there's no console anywhere near them.
      * G_WIN32_ATTACH_CONSOLE, if set to a comma-separated list of
        standard stream names (stdint, stdout, stderr), will reopen
        a given std stream and tie it to the console (using existing console
        or parent console).
        This works either with the other option (to create a console),
        or if the app is launched from a console process (often the
        case for developers).
        The redirection is done with freopen(), dup() and dup2().
        If everything goes well, C file descriptors 0, 1 or 2 will
        be bound to stdin, stdout and stderr respectively (only for
        streams listed in the envrionmental variable), and so will
        be stdio streams by the same names.
      
      With these it's possible to see the output of g_log*() functions
      when running GTK4 applications, which are linked as GUI applications,
      and thus do not get a console by default.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=790857
      
      Fixes issue #1304
      460cc723
  2. 24 May, 2017 1 commit
    • Sébastien Wilmet's avatar
      glib/: LGPLv2+ -> LGPLv2.1+ · f9faac76
      Sébastien Wilmet authored
      All glib/*.{c,h} files have been processed, as well as gtester-report.
      
      12 of those files are not licensed under LGPL:
      
      	gbsearcharray.h
      	gconstructor.h
      	glibintl.h
      	gmirroringtable.h
      	gscripttable.h
      	gtranslit-data.h
      	gunibreak.h
      	gunichartables.h
      	gunicomp.h
      	gunidecomp.h
      	valgrind.h
      	win_iconv.c
      
      Some of them are generated files, some are licensed under a BSD-style
      license and win_iconv.c is in the public domain.
      
      Sub-directories inside glib/:
      
      	deprecated/: processed in a previous commit
      	glib-mirroring-tab/: already LGPLv2.1+
      	gnulib/: not modified, the code is copied from gnulib
      	libcharset/: a copy
      	pcre/: a copy
      	tests/: processed in a previous commit
      
      https://bugzilla.gnome.org/show_bug.cgi?id=776504
      f9faac76
  3. 26 Apr, 2016 1 commit
    • LRN's avatar
      Add g_system_thread_set_name() implementation for W32 threads · e1188564
      LRN authored
      This works by using semi-documented[1] exception to tell the debugger
      that a thread needs to have its name changed.
      
      If this exception is not caught and handled by something, it will crash
      the process, so we need to set up our own handler in case there's no
      debugger attached or the debugger can't handle this type of exception.
      
      Since SEH is not supported by gcc on i686 (at the moment), we need to use VEH
      instead. For completeness the MSVC-oriented code still uses SEH, although
      there is no reason why it shouldn't work with the VEH variant used by MinGW.
      
      VEH handler has to be set up somewhere (g_thread_win32_init () works nicely)
      and removed once it's not needed (g_thread_win32_process_detach () is added
      expressly for that purpose). Note that g_thread_win32_process_detach() is
      only called when glib is unloaded by FreeLibrary(), not when glib-using
      process is terminating.
      
      This exception is known to work with WinDbg, and adding support for it into
      GDB proved to be feasible (GDB patch will be sent upstream, eventually).
      
      [1] https://msdn.microsoft.com/en-us/library/xcb2z8hs%28v=vs.71%29.aspx
      
      https://bugzilla.gnome.org/show_bug.cgi?id=747478
      e1188564
  4. 08 Oct, 2015 1 commit
  5. 12 Sep, 2015 1 commit
  6. 31 Jan, 2014 1 commit
  7. 20 Oct, 2013 1 commit
  8. 18 Jan, 2013 1 commit
  9. 16 Nov, 2011 1 commit
  10. 04 Oct, 2011 2 commits