mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-12 13:49:22 +01:00
Fix off-by-one error. (#100853)
2002-12-11 Tor Lillqvist <tml@iki.fi> * glib/gtimer.c (g_timer_elapsed): Fix off-by-one error. (#100853) * glib/gfileutils.c (g_file_test): Bypass extra test for root on Win32. * glib/glib.def: Add g_{get,set}_application_name.
This commit is contained in:
parent
d0579998b2
commit
12bc3d826c
@ -1,3 +1,12 @@
|
|||||||
|
2002-12-11 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/gtimer.c (g_timer_elapsed): Fix off-by-one error. (#100853)
|
||||||
|
|
||||||
|
* glib/gfileutils.c (g_file_test): Bypass extra test for root on
|
||||||
|
Win32.
|
||||||
|
|
||||||
|
* glib/glib.def: Add g_{get,set}_application_name.
|
||||||
|
|
||||||
Wed Dec 11 17:53:34 2002 Owen Taylor <otaylor@redhat.com>
|
Wed Dec 11 17:53:34 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* === Release 2.1.4 ===
|
* === Release 2.1.4 ===
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2002-12-11 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/gtimer.c (g_timer_elapsed): Fix off-by-one error. (#100853)
|
||||||
|
|
||||||
|
* glib/gfileutils.c (g_file_test): Bypass extra test for root on
|
||||||
|
Win32.
|
||||||
|
|
||||||
|
* glib/glib.def: Add g_{get,set}_application_name.
|
||||||
|
|
||||||
Wed Dec 11 17:53:34 2002 Owen Taylor <otaylor@redhat.com>
|
Wed Dec 11 17:53:34 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* === Release 2.1.4 ===
|
* === Release 2.1.4 ===
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2002-12-11 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/gtimer.c (g_timer_elapsed): Fix off-by-one error. (#100853)
|
||||||
|
|
||||||
|
* glib/gfileutils.c (g_file_test): Bypass extra test for root on
|
||||||
|
Win32.
|
||||||
|
|
||||||
|
* glib/glib.def: Add g_{get,set}_application_name.
|
||||||
|
|
||||||
Wed Dec 11 17:53:34 2002 Owen Taylor <otaylor@redhat.com>
|
Wed Dec 11 17:53:34 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* === Release 2.1.4 ===
|
* === Release 2.1.4 ===
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2002-12-11 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/gtimer.c (g_timer_elapsed): Fix off-by-one error. (#100853)
|
||||||
|
|
||||||
|
* glib/gfileutils.c (g_file_test): Bypass extra test for root on
|
||||||
|
Win32.
|
||||||
|
|
||||||
|
* glib/glib.def: Add g_{get,set}_application_name.
|
||||||
|
|
||||||
Wed Dec 11 17:53:34 2002 Owen Taylor <otaylor@redhat.com>
|
Wed Dec 11 17:53:34 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* === Release 2.1.4 ===
|
* === Release 2.1.4 ===
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2002-12-11 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/gtimer.c (g_timer_elapsed): Fix off-by-one error. (#100853)
|
||||||
|
|
||||||
|
* glib/gfileutils.c (g_file_test): Bypass extra test for root on
|
||||||
|
Win32.
|
||||||
|
|
||||||
|
* glib/glib.def: Add g_{get,set}_application_name.
|
||||||
|
|
||||||
Wed Dec 11 17:53:34 2002 Owen Taylor <otaylor@redhat.com>
|
Wed Dec 11 17:53:34 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* === Release 2.1.4 ===
|
* === Release 2.1.4 ===
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2002-12-11 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/gtimer.c (g_timer_elapsed): Fix off-by-one error. (#100853)
|
||||||
|
|
||||||
|
* glib/gfileutils.c (g_file_test): Bypass extra test for root on
|
||||||
|
Win32.
|
||||||
|
|
||||||
|
* glib/glib.def: Add g_{get,set}_application_name.
|
||||||
|
|
||||||
Wed Dec 11 17:53:34 2002 Owen Taylor <otaylor@redhat.com>
|
Wed Dec 11 17:53:34 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* === Release 2.1.4 ===
|
* === Release 2.1.4 ===
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2002-12-11 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/gtimer.c (g_timer_elapsed): Fix off-by-one error. (#100853)
|
||||||
|
|
||||||
|
* glib/gfileutils.c (g_file_test): Bypass extra test for root on
|
||||||
|
Win32.
|
||||||
|
|
||||||
|
* glib/glib.def: Add g_{get,set}_application_name.
|
||||||
|
|
||||||
Wed Dec 11 17:53:34 2002 Owen Taylor <otaylor@redhat.com>
|
Wed Dec 11 17:53:34 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* === Release 2.1.4 ===
|
* === Release 2.1.4 ===
|
||||||
|
@ -156,14 +156,16 @@ g_file_test (const gchar *filename,
|
|||||||
if ((test & G_FILE_TEST_IS_DIR) && S_ISDIR (s.st_mode))
|
if ((test & G_FILE_TEST_IS_DIR) && S_ISDIR (s.st_mode))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
#ifndef G_OS_WIN32
|
||||||
/* The extra test for root when access (file, X_OK) succeeds.
|
/* The extra test for root when access (file, X_OK) succeeds.
|
||||||
|
* Probably only makes sense on Unix.
|
||||||
*/
|
*/
|
||||||
if ((test & G_FILE_TEST_IS_EXECUTABLE) &&
|
if ((test & G_FILE_TEST_IS_EXECUTABLE) &&
|
||||||
((s.st_mode & S_IXOTH) ||
|
((s.st_mode & S_IXOTH) ||
|
||||||
(s.st_mode & S_IXUSR) ||
|
(s.st_mode & S_IXUSR) ||
|
||||||
(s.st_mode & S_IXGRP)))
|
(s.st_mode & S_IXGRP)))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,6 +165,7 @@ EXPORTS
|
|||||||
g_find_program_in_path
|
g_find_program_in_path
|
||||||
g_fprintf
|
g_fprintf
|
||||||
g_free
|
g_free
|
||||||
|
g_get_application_name
|
||||||
g_get_charset
|
g_get_charset
|
||||||
g_get_codeset
|
g_get_codeset
|
||||||
g_get_current_dir
|
g_get_current_dir
|
||||||
@ -480,6 +481,7 @@ EXPORTS
|
|||||||
g_scanner_sync_file_offset
|
g_scanner_sync_file_offset
|
||||||
g_scanner_unexp_token
|
g_scanner_unexp_token
|
||||||
g_scanner_warn
|
g_scanner_warn
|
||||||
|
g_set_application_name
|
||||||
g_set_error
|
g_set_error
|
||||||
g_set_prgname
|
g_set_prgname
|
||||||
g_set_print_handler
|
g_set_print_handler
|
||||||
|
@ -135,7 +135,7 @@ g_timer_elapsed (GTimer *timer,
|
|||||||
|
|
||||||
/* Check for wraparound, which happens every 49.7 days. */
|
/* Check for wraparound, which happens every 49.7 days. */
|
||||||
if (timer->end < timer->start)
|
if (timer->end < timer->start)
|
||||||
total = (UINT_MAX - (timer->start - timer->end)) / 1000.0;
|
total = (UINT_MAX - (timer->start - timer->end - 1)) / 1000.0;
|
||||||
else
|
else
|
||||||
total = (timer->end - timer->start) / 1000.0;
|
total = (timer->end - timer->start) / 1000.0;
|
||||||
|
|
||||||
@ -143,7 +143,7 @@ g_timer_elapsed (GTimer *timer,
|
|||||||
{
|
{
|
||||||
if (timer->end < timer->start)
|
if (timer->end < timer->start)
|
||||||
*microseconds =
|
*microseconds =
|
||||||
((UINT_MAX - (timer->start - timer->end)) % 1000) * 1000;
|
((UINT_MAX - (timer->start - timer->end - 1)) % 1000) * 1000;
|
||||||
else
|
else
|
||||||
*microseconds =
|
*microseconds =
|
||||||
((timer->end - timer->start) % 1000) * 1000;
|
((timer->end - timer->start) % 1000) * 1000;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user