Sponsored Content
Top Forums Programming enable 64bit long type for gcc Post 302270094 by jim mcnamara on Friday 19th of December 2008 03:58:55 PM
Old 12-19-2008
I ran this in a 32 bit executable under ubuntu:

Code:
#include <sys/types.h>
#include <stdio.h>

void foo(time_t t)
{
	printf("%u\n", t); 
	printf("%d\n", t);
}

int main()
{
	time_t tim=1230768000;
	foo(tim);
	return 0;
}

This is what I got:
Code:
/home/jmcnama> a.out
1230768000
1230768000

You have a coding problem not a datatype problem. Can you post the shortest possible chunk of code that shows your problem?
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

32bit vs 64bit

Whats the difference between 32bit and 64bit OS's or applications. I understand it a little but its just not clicking the way the teacher explained to me thanks, any info would be much appreciated (1 Reply)
Discussion started by: eloquent99
1 Replies

2. Shell Programming and Scripting

String type to date type

Can one string type variable changed into the date type variable. (1 Reply)
Discussion started by: rinku
1 Replies

3. Programming

array type has incomplete element type

Dear colleagues, One of my friend have a problem with c code. While compiling a c program it displays a message like "array type has incomplete element type". Any body can provide a solution for it. Jaganadh.G (1 Reply)
Discussion started by: jaganadh
1 Replies

4. Solaris

Installing gcc - recieve error message gcc : cannot execute

AIM- Install Oracle 11g on Solaris using VMWare Steps 1.Logged on as root 2.Created subfolders à /usr/local/bin & /usr/local/bin/gcc 3.Downloaded gcc & libiconv & unzipped them on my harddrive & burnt them on CD 4.Copied files from CD to /usr/local/bin/gcc 5.Terminal (root) à pkgadd -d... (8 Replies)
Discussion started by: Ackers
8 Replies

5. Programming

gcc 4.3.2 accept sys call warrning incompatible pointer type

Hi all, this warning is driving me nuts. I use -pedantic with -Wall and -Werror so this needs to be fixed. BUILD: GNU-Linux-x86 Any ideas? struct sockaddr_in server_addr; int addr_len = sizeof (server_addr); fd = accept(link->socket_fd, (struct sockaddr_in *)... (2 Replies)
Discussion started by: personificator
2 Replies

6. Programming

Problem FETCHing Long data type using CURSOR

Currently my Pro*c program is fetching a cloumn which is defined as LONG in oracle db. The data in the column is around 65k. But when I am FETCHing it to a varchar variable, I am only getting 22751 bytes of data using cursor. Is there any limitation on the data which is fetched by a cursor in... (2 Replies)
Discussion started by: manbt
2 Replies

7. Red Hat

How to enable AIO and DIO on rhel5 64bit?

Hi Friends, Please help me to understand, how to enable async disk IO and Direct disk IO in ext3 filesystem on rhel5. Regards, Arumon (0 Replies)
Discussion started by: arumon
0 Replies

8. Shell Programming and Scripting

Extracting LONG Data Type from DB via UNIX Script

Hi, I want to extract a XML file which is stored in the database having a data Type as "LONG" via UNIX Scripting. But when i am triggering the SQL via UNIX it is fetching only the first Line and not the complete XML. Can you please suggest if the parameters that i have used needs any... (0 Replies)
Discussion started by: dear_abhi2007
0 Replies

9. Shell Programming and Scripting

Extracting LONG Data Type from DB via UNIX Script

Hi, I want to extract a XML file which is stored in the database having a data Type as "LONG" via UNIX Scripting. But when i am triggering the SQL via UNIX it is fetching only the first Line and not the complete XML. Can you please suggest if the parameters that i have used needs any... (2 Replies)
Discussion started by: Barbara1234
2 Replies
TIMER_SETTIME(2)					      BSD System Calls Manual						  TIMER_SETTIME(2)

NAME
timer_settime, timer_gettime, timer_getoverrun -- process timer manipulation LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <time.h> int timer_settime(timer_t timerid, int flags, const struct itimerspec * restrict tim, struct itimerspec * restrict otim); int timer_gettime(timer_t timerid, struct itimerspec *tim); int timer_getoverrun(timer_t timerid); DESCRIPTION
The timer_settime() sets the next expiration time of the timer with ID timerid to the it_value (see itimerspec(3)) specified in the tim argu- ment. If the value is 0, the timer is disarmed. If the argument otim is not NULL the old timer settingas are returned. If the flags argument is set to TIMER_RELTIME then the expiration time is set to the value in nanoseconds specified in the tim argument from the time the call to timer_settime() was made. If the flags argument is set to TIMER_ABSTIME then the expiration time is set to be equal to the difference between the clock associated with this timer, and the value specified in the tim argument. If that time has already passed, then the call succeeds, and the expiration notification occurs. If the it_interval of the tim argument is non-zero, then the timer reloads upon expiration. The timer_gettime() function returns the current settings of the timer specified by the timerid argument in the tim argument. Only one notification event (signal) can be pending for a given timer and process. If a timer expires while the signal is still queued for delivery, then the overrun counter for that timer is increased. The counter can store values up to DELAYTIMER_MAX. When the signal is finally delivered to the process, then the timer_getoverrun() function can be used to retrieve the overrun counter for the timer specified in the timerid argument. NOTES
Expiration time values are always rounded up to the resolution of the timer, so a notification will never be sent before the requested time. Values returned in the otim argument of timer_settime() or in the tim argment of timer_gettime() are subject to the above rounding effect and might not exactly match the requested values by the user. RETURN VALUES
If successful, the timer_gettime() and timer_settime() functions return 0, and the timer_getoverrun() function returns the expiration overrun count for the specified timer. Otherwise, the functions return -1, and set errno to indicate the error. ERRORS
The timer_gettime(), timer_getoverrun(), and timer_settime() functions will fail if: [EINVAL] The argument timerid does not correspond to a valid timer id as returned by timer_create() or that timer id has been deleted by timer_delete(). The timer_settime() function will fail if: [EINVAL] A nanosecond field in the tim structure specified a value less than zero or greater than or equal to 10e9. SEE ALSO
clock_gettime(2), timer_create(2), timer_delete(2) STANDARDS
IEEE Std 1003.1b-1993 (``POSIX.1''), IEEE Std 1003.1i-1995 (``POSIX.1'') BSD
May 17, 2010 BSD
All times are GMT -4. The time now is 08:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy