[haiku-commits] haiku: hrev51545 - headers/os/kernel src/system/libroot/os src/system/kernel

  • From: waddlesplash@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 15 Nov 2017 18:33:12 +0100 (CET)

hrev51545 adds 2 changesets to branch 'master'
old head: f009c69debb31eda3829178df4fe4539339de324
new head: 9a50e01ea66b83ee7b2b122724ea5e3f3df3d8cb
overview: 
http://cgit.haiku-os.org/haiku/log/?qt=range&q=9a50e01ea66b+%5Ef009c69debb3

----------------------------------------------------------------------------

a7c323c633f7: libroot/time: set_timezone is deprecated and does nothing, so 
don't return B_OK.

9a50e01ea66b: set_real_time_clock: Change parameter from uint32 to uint64.
  
  This should have been done along with the time_t change, but I forgot
  to check this then.
  
  Technically this breaks ABI against BeOS, but:
    1. BeOS used an int32, so we'd already slightly broken ABI here
    2. Only one thing at HaikuArchives (VMwareAddons) and one recipe at 
HaikuPorts
       (samba) uses this function at all.
  
  If it turns out some critical BeOS app uses this, then I guess we can enclose
  GCC2 guards around it, but since I can't find any evidence of that, I'm
  pushing it without them for now.

                              [ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]

----------------------------------------------------------------------------

3 files changed, 4 insertions(+), 4 deletions(-)
headers/os/kernel/OS.h                | 2 +-
src/system/kernel/real_time_clock.cpp | 2 +-
src/system/libroot/os/time.cpp        | 4 ++--

############################################################################

Commit:      a7c323c633f728cef462742bf193dfa029799bca
URL:         http://cgit.haiku-os.org/haiku/commit/?id=a7c323c633f7
Author:      Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date:        Wed Nov 15 17:11:33 2017 UTC

libroot/time: set_timezone is deprecated and does nothing, so don't return B_OK.

----------------------------------------------------------------------------

diff --git a/src/system/libroot/os/time.cpp b/src/system/libroot/os/time.cpp
index 7b882cd..5ba397b 100644
--- a/src/system/libroot/os/time.cpp
+++ b/src/system/libroot/os/time.cpp
@@ -74,7 +74,7 @@ set_timezone(const char* /*timezone*/)
         *
         * TODO: should we keep this around for compatibility or get rid of it?
         */
-       return B_OK;
+       return B_DONT_DO_THAT;
 }
 
 

############################################################################

Revision:    hrev51545
Commit:      9a50e01ea66b83ee7b2b122724ea5e3f3df3d8cb
URL:         http://cgit.haiku-os.org/haiku/commit/?id=9a50e01ea66b
Author:      Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date:        Wed Nov 15 17:28:04 2017 UTC

set_real_time_clock: Change parameter from uint32 to uint64.

This should have been done along with the time_t change, but I forgot
to check this then.

Technically this breaks ABI against BeOS, but:
  1. BeOS used an int32, so we'd already slightly broken ABI here
  2. Only one thing at HaikuArchives (VMwareAddons) and one recipe at HaikuPorts
     (samba) uses this function at all.

If it turns out some critical BeOS app uses this, then I guess we can enclose
GCC2 guards around it, but since I can't find any evidence of that, I'm
pushing it without them for now.

----------------------------------------------------------------------------

diff --git a/headers/os/kernel/OS.h b/headers/os/kernel/OS.h
index 30a3290..0ea55ce 100644
--- a/headers/os/kernel/OS.h
+++ b/headers/os/kernel/OS.h
@@ -374,7 +374,7 @@ extern status_t             convert_to_pthread(thread_id 
thread, pthread_t *_thread);
 /* Time */
 
 extern uint32          real_time_clock(void);
-extern void                    set_real_time_clock(uint32 secsSinceJan1st1970);
+extern void                    set_real_time_clock(uint64 secsSinceJan1st1970);
 extern bigtime_t       real_time_clock_usecs(void);
 extern bigtime_t       system_time(void);
                                                /* time since booting in 
microseconds */
diff --git a/src/system/kernel/real_time_clock.cpp 
b/src/system/kernel/real_time_clock.cpp
index 8f86578..bd2faa1 100644
--- a/src/system/kernel/real_time_clock.cpp
+++ b/src/system/kernel/real_time_clock.cpp
@@ -123,7 +123,7 @@ set_real_time_clock_usecs(bigtime_t currentTime)
 
 
 void
-set_real_time_clock(uint32 currentTime)
+set_real_time_clock(uint64 currentTime)
 {
        set_real_time_clock_usecs((bigtime_t)currentTime * 1000000);
 }
diff --git a/src/system/libroot/os/time.cpp b/src/system/libroot/os/time.cpp
index 5ba397b..658ec3f 100644
--- a/src/system/libroot/os/time.cpp
+++ b/src/system/libroot/os/time.cpp
@@ -60,7 +60,7 @@ real_time_clock_usecs(void)
 
 
 void
-set_real_time_clock(uint32 secs)
+set_real_time_clock(uint64 secs)
 {
        _kern_set_real_time_clock((bigtime_t)secs * 1000000);
 }


Other related posts: