1. 02 Sep, 2020 1 commit
  2. 01 May, 2020 1 commit
  3. 31 Oct, 2019 1 commit
    • Simon McVittie's avatar
      goption: Relax assertion to avoid being broken by kdeinit5 · 00210aad
      Simon McVittie authored
      kdeinit5 overwrites argv, which in turn results in /proc/self/cmdline
      being overwritten. It seems that this is done in a way that does not
      necessarily guarantee that /proc/self/cmdline will end up NUL-terminated.
      However, g_file_get_contents() is documented to fill a buffer of size
      len + 1, where buffer[len] == '\0', even if the file's actual contents
      (from buffer[0] to buffer[len-1] inclusive) did not include a NUL;
      so we can safely relax this assertion slightly.
      Resolves: #1923
      Signed-off-by: Simon McVittie's avatarSimon McVittie <smcv@collabora.com>
  4. 29 Aug, 2019 1 commit
  5. 27 Aug, 2019 1 commit
  6. 24 Aug, 2019 1 commit
    • Colin Walters's avatar
      glib/goption.c: Replace precondition with assertion · 651e3b05
      Colin Walters authored
      A static analysis run noted that we weren't freeing the cmdline in the
      error path here.  We can just make this an assertion instead; I just
      checked the kernel code, and it just usees a seq_printf() here which
      will NUL terminate.
  7. 24 Jun, 2019 1 commit
  8. 16 Apr, 2019 1 commit
    • LRN's avatar
      W32: swap special g_get_prgname() for platform_get_argv0() · cf39fbd0
      LRN authored and Philip Withnall's avatar Philip Withnall committed
      Commit 398008da added a W32-only code (from commit 7e0e251a)
      to g_get_prgname() that makes this function never return NULL. This
      is inconsistent with the other platforms. Revert the change, and add an
      implementation for platform_get_argv0(), which is used by GOption when
      g_get_prgname() == NULL.
      The W32 platform_get_argv0() code is different from the one that was in
      g_get_prgname(), because it should be getting argv0, not the name
      of the executable that is being run (although most of the time they are
      one and the same).
      Adjust thest option-argv0 test to expect it to pass on W32.
  9. 03 Apr, 2019 1 commit
    • LRN's avatar
      Check for /proc/self/cmdline · 4c038a27
      LRN authored
      Instead of hardcoding /proc/self/cmdline use for __linux__ only,
      do a configure-time test for it.
      Specifically, this enables /proc/self/cmdline use on Cygwin.
      The configure-time test is very primitive (just tests that the
      file exists and that it's possible to read more than one byte from it),
      relying on the testsuite for more extensive checks.
      The test in the testsuite is modified to always run, even on platforms
      where it isn't supposed to pass. If it fails there, the testing framework
      skips it. If the test unexpectedly passes, that is reported too.
  10. 15 Mar, 2019 1 commit
    • Emmanuel Fleury's avatar
      Fixing signedness in glib/goptions.c · aef59ca7
      Emmanuel Fleury authored
      glib/goption.c: In function ‘context_has_h_entry’:
      glib/goption.c:785:21: error: comparison of integer expressions of different signedness: ‘gsize’ {aka ‘long unsigned int’} and ‘gint’ {aka ‘int’} [-Werror=sign-compare]
             for (i = 0; i < context->main_group->n_entries; i++)
      glib/goption.c:797:21: error: comparison of integer expressions of different signedness: ‘gsize’ {aka ‘long unsigned int’} and ‘gint’ {aka ‘int’} [-Werror=sign-compare]
             for (i = 0; i < group->n_entries; i++)
  11. 17 Dec, 2018 1 commit
  12. 30 Jul, 2018 1 commit
  13. 14 Jun, 2018 1 commit
  14. 07 Nov, 2017 1 commit
  15. 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:
      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
  16. 02 Dec, 2016 1 commit
  17. 22 Nov, 2016 1 commit
  18. 12 Oct, 2016 1 commit
  19. 13 Sep, 2016 1 commit
  20. 27 Jul, 2015 1 commit
  21. 25 May, 2015 1 commit
  22. 11 Feb, 2015 1 commit
  23. 12 Dec, 2014 1 commit
  24. 20 Oct, 2014 1 commit
    • Allison Karlitskaya's avatar
      GOption: stop calling getopt() · 817f82da
      Allison Karlitskaya authored
      We called getopt() to try to find out of the platform on which we are
      running defaults to strict POSIX-style argument handling (ie: flags
      following the first filename are considered as further filenames rather
      than flags).
      This is the default case on BSDs, for example.  It is also the case on
      GNU systems with the POSIXLY_CORRECT environment variable set.
      Unfortunately many of our tools rely on being able to accept commandline
      arguments in the non-strict ordering and the code for making these calls
      is spread widely (for example in Makefile fragments invoking some of our
      build tools).
      For this reason we need to revert the getopt() check and only enable
      strict POSIX mode in the case that the application explicitly opts into
      it using the _set_strict_posix() API.
      This also fixs a failure to build on Windows due to missing getopt().
  25. 15 Oct, 2014 1 commit
    • Allison Karlitskaya's avatar
      GOption: add strict posix mode · ae52ab3d
      Allison Karlitskaya authored
      Add a "posixly correct" mode to GOption to stop parsing arguments as
      soon as the first non-option argument is encountered.
      We determine the default value on the basis of duplicating the behaviour
      of the system getopt() implementation (which we directly check the
      behaviour of at runtime).  On GNU systems this allows the user to modify
      our behaviour using POSIXLY_CORRECT.
      The user can change the value by g_option_context_set_strict_posix(),
      which might be useful for some usecases of GOptionContext (as mentioned
      in the doc string of this new function).
  26. 22 Jun, 2014 1 commit
  27. 06 May, 2014 1 commit
  28. 20 Apr, 2014 1 commit
  29. 20 Feb, 2014 1 commit
  30. 15 Feb, 2014 1 commit
    • Matthias Clasen's avatar
      docs: let go of &ast; · bc6ee788
      Matthias Clasen authored
      Since we are no longer using sgml mode, using /&ast; &ast;/ to
      escape block comments inside examples does not work anymore.
      Switch to using line comments with //
  31. 08 Feb, 2014 1 commit
  32. 06 Feb, 2014 5 commits
  33. 01 Feb, 2014 4 commits