I am working around a problem called Y2038 bug. http://groups.google.co.in/group/com...16aaf1f50f863e
I am developing an application which need to be built both on windows
and linux and used time_t, ctime, mktime, localtime and gmtime
functions from <time.h>.
The application already exists and I have to replace these 32bit time
structures with their 64bit equivalents. I have made all the changes
and built the application on windows but can't do so on linux because
Linux does not seem to have a 64 bit equivalent for time_t , or
mktime.. http://msdn2.microsoft.com/en-us/library/bf12f0hc.aspx
Is there a patch or some workaround it? need suggestions
Thanks 9 7156
Aditi wrote:
I am working around a problem called Y2038 bug. http://groups.google.co.in/group/com...16aaf1f50f863e
I am developing an application which need to be built both on windows
and linux and used time_t, ctime, mktime, localtime and gmtime
functions from <time.h>.
Since <time.his a standard C header, you may be trying too hard.
If you just let the compiler/library vendor worry about the proper
implementation, and do not rely on the fact that 'time_t' is a 32
bit signed number of seconds from January 1, 1970, you shouldn't
have to do anything.
The application already exists and I have to replace these 32bit time
structures with their 64bit equivalents.
Why do you think you have to? You just need a proper way of
calculating time differences instead of doing arithmetic directly
on the 'time_t' type.
I have made all the changes
and built the application on windows but can't do so on linux because
Linux does not seem to have a 64 bit equivalent for time_t , or
mktime..
http://msdn2.microsoft.com/en-us/library/bf12f0hc.aspx
Is there a patch or some workaround it? need suggestions
Thanks
Suggestion: don't.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
* Victor Bazarov peremptorily fired off this memo:
Aditi wrote:
>I am working around a problem called Y2038 bug. http://groups.google.co.in/group/com...16aaf1f50f863e
I am developing an application which need to be built both on windows and linux and used time_t, ctime, mktime, localtime and gmtime functions from <time.h>.
Since <time.his a standard C header, you may be trying too hard.
If you just let the compiler/library vendor worry about the proper
implementation, and do not rely on the fact that 'time_t' is a 32
bit signed number of seconds from January 1, 1970, you shouldn't
have to do anything.
>The application already exists and I have to replace these 32bit time structures with their 64bit equivalents.
Why do you think you have to? You just need a proper way of
calculating time differences instead of doing arithmetic directly
on the 'time_t' type.
Also, on 64-bit systems (at least on my version of Linux), time_t is a
long int, and (for example) "date" and "cal" support years after 2038.
>I have made all the changes and built the application on windows but can't do so on linux because Linux does not seem to have a 64 bit equivalent for time_t , or mktime..
Where did you get that idea? Look at the header files on a 64-bit linux
system.
>http://msdn2.microsoft.com/en-us/library/bf12f0hc.aspx Is there a patch or some workaround it? need suggestions Thanks
Suggestion: don't.
--
At Microsoft there are lots of brilliant ideas but the image is that they all
come from the top - I'm afraid that's not quite right.
-- Bill Gates
On Feb 11, 9:29 pm, Linonut <lino...@bollsouth.nutwrote:
* Victor Bazarov peremptorily fired off this memo:
Aditi wrote:
I am working around a problem called Y2038 bug. http://groups.google.co.in/group/com...rowse_thread/t...
I am developing an application which need to be built both on windows
and linux and used time_t, ctime, mktime, localtime and gmtime
functions from <time.h>.
Since <time.his a standard C header, you may be trying too hard.
If you just let the compiler/library vendor worry about the proper
implementation, and do not rely on the fact that 'time_t' is a 32
bit signed number of seconds from January 1, 1970, you shouldn't
have to do anything.
The application already exists and I have to replace these 32bit time
structures with their 64bit equivalents.
Why do you think you have to? You just need a proper way of
calculating time differences instead of doing arithmetic directly
on the 'time_t' type.
Also, on 64-bit systems (at least on my version of Linux), time_t is a
long int, and (for example) "date" and "cal" support years after 2038.
I have made all the changes
and built the application on windows but can't do so on linux because
Linux does not seem to have a 64 bit equivalent for time_t , or
mktime..
Where did you get that idea? Look at the header files on a 64-bit linux
system.
>http://msdn2.microsoft.com/en-us/library/bf12f0hc.aspx
Is there a patch or some workaround it? need suggestions
Thanks
Suggestion: don't.
--
At Microsoft there are lots of brilliant ideas but the image is that they all
come from the top - I'm afraid that's not quite right.
-- Bill Gates
I am using a 32bit system, instead of using a third party library I
wanted to know if there is a patch aruond the existing system
libraries like time.h?
On Feb 11, 9:29 pm, Linonut <lino...@bollsouth.nutwrote:
* Victor Bazarov peremptorily fired off this memo:
Aditi wrote:
I am working around a problem called Y2038 bug. http://groups.google.co.in/group/com...rowse_thread/t...
I am developing an application which need to be built both on windows
and linux and used time_t, ctime, mktime, localtime and gmtime
functions from <time.h>.
Since <time.his a standard C header, you may be trying too hard.
If you just let the compiler/library vendor worry about the proper
implementation, and do not rely on the fact that 'time_t' is a 32
bit signed number of seconds from January 1, 1970, you shouldn't
have to do anything.
The application already exists and I have to replace these 32bit time
structures with their 64bit equivalents.
Why do you think you have to? You just need a proper way of
calculating time differences instead of doing arithmetic directly
on the 'time_t' type.
Also, on 64-bit systems (at least on my version of Linux), time_t is a
long int, and (for example) "date" and "cal" support years after 2038.
I have made all the changes
and built the application on windows but can't do so on linux because
Linux does not seem to have a 64 bit equivalent for time_t , or
mktime..
Where did you get that idea? Look at the header files on a 64-bit linux
system.
>http://msdn2.microsoft.com/en-us/library/bf12f0hc.aspx
Is there a patch or some workaround it? need suggestions
Thanks
Suggestion: don't.
--
At Microsoft there are lots of brilliant ideas but the image is that they all
come from the top - I'm afraid that's not quite right.
-- Bill Gates
I am working on a 32-bit system and I was looking for patch around the
existing system libraries. Something like on this webpage?
I am not sure but what would this patch do? http://linux.derkeiler.com/Mailing-L...5-11/6048.html
On 2008-02-12 05:16:27 -0500, James Kanze <ja*********@gmail.comsaid:
(Boost
has support for time and dates, for example. I don't know
whether it's being considered for inclusion in the next standard
or not, however.)
A small part of it is currently in the draft standard, for use with the
threading library. The full Boost date-time library is slated for TR2,
which is not getting much work at the moment.
--
Pete
Roundhouse Consulting, Ltd. ( www.versatilecoding.com) Author of "The
Standard C++ Library Extensions: a Tutorial and Reference
( www.petebecker.com/tr1book)
On Feb 12, 3:01 pm, "Victor Bazarov" <v.Abaza...@comAcast.netwrote:
James Kanze wrote:
[..]
I'm tempted to say that time in Unix (and thus in C/C++) is
broken
I am not certain why you would want to draw the conclusion
that if Unix time is broken, then so is C/C++ time. If you
rely on the time implementation specific to Unix, you have a
very simple case of platform specificity. The code as such is
non-portable and that's what the OP has, apparently.
The underlying principles of time in C/C++ are based on the Unix
model.
[...]
I suspect that he really should drop <time.hfor this.
The OP didn't say _for what_ he is using <time.h>. So, I would
not be as bold as to say he should drop it.
He did say that he needed dates beyond 2038. If he needs them
today, then the Unix/C/C++ model is not what he needs.
--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
On Feb 12, 2:14 pm, Rainer Lehrig <leh...@t-online.dewrote:
I would not worry about time.h
The width of the datafields might be changed when 2038 comes near.
The width of the data fields is already implementation
dependent, and varies over different machines I use. So you
can't use it today for anything external.
--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
* Aditi peremptorily fired off this memo:
I am not sure but what would this patch do?
http://linux.derkeiler.com/Mailing-L...5-11/6048.html
Barking up the wrong tree. Check this out instead: http://www.ofx.net/
There's an open source library for it, libofx.
--
God is not willing to do everything, and thus take away our free will and that
share of glory which belongs to us.
-- Niccolo Machiavelli
Aditi wrote:
I am using a 32bit system, instead of using a third party library I
wanted to know if there is a patch aruond the existing system
libraries like time.h?
You can't just modify the runtime library since the kernel is also using
a 32-bit value for time_t (that is, the kernel _is_ using time_t, and
exports this to the userland, whereas on Windows, it probably is using
its own, different, time structures, and the Unixoid time_t is only used
in the library.) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Wen Jiang |
last post by:
Hi,
Has anyone been able to get pymat work on a 64bit linux system? I
compiled the CVS version of pymat with python2.3/matlab7.01 on
Mandrake10.1 64bit system, it can start the engine and use...
|
by: Christian McArdle |
last post by:
REQUEST FOR DISCUSSION (RFD)
unmoderated group comp.os.ms-windows.programmer.64bit
This is a formal Request For Discussion (RFD) to create
comp.os.ms-windows.programmer.64bit as an unmoderated...
|
by: Vijay Chegu |
last post by:
Hi All,
I am trying to port a perfectly working 32bit COM module developed in
VC++ from 64bit.
I am not able to generate .tlb file through midl compiler.
I set the property thru the...
|
by: ramu |
last post by:
Hi
I have to call a vc++ function in a c program.
suppose i have a function
dword fun(dword arg1, bstr arg2); in vc++.
I have to call this function in c. But I don't have dword datatype in...
|
by: dwelch91 |
last post by:
I need to detect whether the operating system I am running on (not the
Python version) is 64bit or 32bit. One requirement is that I need to
include support for non-Intel/AMD architectures.
The 2...
|
by: cman |
last post by:
Hi guys, why does this fail raising bad_alloc
int *v = new int ;
if this succeeds
int *v = (int *) malloc((unsigned)6000000000)
both on the same machine, same compiler g++, 64bit linux red...
|
by: Leo Park |
last post by:
Hello, guys.
I want to compile 32bit *.c and *.cc files On 64bit x86_64 systems.
But, it is not work.
...
|
by: Morfys |
last post by:
Hi,
I would like to copy glibc/libgcc (in particular, libc.so.
6,libgcc_s.so.1) for a 32bit machine onto a 64bit machine. Would
using the 32bit glibc/libgcc on the 64bit machine work?
The...
|
by: legrape |
last post by:
I am porting a piece of C code to 64bit on Linux. I am using 64bit
integers. It is a floating point intensive code and when I compile
(gcc) on 64 bit machine, I don't see any runtime improvement...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: linyimin |
last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
|
by: erikbower65 |
last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA:
1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
|
by: Taofi |
last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same
This are my field names
ID, Budgeted, Actual, Status and Differences
...
|
by: DJRhino1175 |
last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this -
If...
|
by: DJRhino |
last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer)
If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _
310030356 Or 310030359 Or 310030362 Or...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: lllomh |
last post by:
How does React native implement an English player?
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
| |