Sponsored Content
Full Discussion: struct timespec in ANSI C
Top Forums Programming struct timespec in ANSI C Post 30870 by mbb on Tuesday 29th of October 2002 05:59:49 AM
Old 10-29-2002
I seem to remember having similiar issues with the time structure myself.

I can't remember whether I was porting code from unix to windows, or from one type of unix to another or (most likely) recompiling on a higher version of HP-UX.

It seems the time.h and its structures are not standard across the board and you may have to compile slightly different code based on your environment.

As Perderabo suggests you may need to examine the different compile switchs already available in your headers, or

use your own pre-processor directives to conditionally compile code, or

write your own time functions and use them instead.

MBB
 

10 More Discussions You Might Find Interesting

1. Programming

K&R vs. ANSI

To anyone that can answer this: Are the differences great between the ANSI and K&R standard? What are some of the major differences between them?? -REM (1 Reply)
Discussion started by: REM
1 Replies

2. Programming

Ansi C

Dear All, I have to develope some C functions in Unix for a Magic program. The original MSE code which compiles the attached C program uses a +z option, but the cc compiler don't know this. The complete command in the compiler script is 'cc -c -Aa +z myfile.c'. The warning message is 'The -z... (4 Replies)
Discussion started by: Frankie
4 Replies

3. HP-UX

ansi problem

Hi! Can anyone help me with the problem i am having. Im new to hpux and i am trying to set up the programs i use. One such program is the irc client BitchX, ive ran it on several pc/sun boxes with no problems. On my c360 with an fx6 card and a eizo f56 17in monitor (1024x768 85hz vesa) the ansi... (0 Replies)
Discussion started by: Lewis
0 Replies

4. HP-UX

ANSI / C Compiler for HP-UX 11.11

Good Day I downloaded Server Evaluation copy of C/ANSI compiler, but when I try to compile a file with it, it gives me following error - (for HP-UX 11.11 v1 PA-RISC) Internal Error: Codeword file /opt/ansic/newconfig/ansic.cwd missing or empty. Detailed Errors are as follows Internal... (3 Replies)
Discussion started by: shawnbishop
3 Replies

5. Shell Programming and Scripting

Convert file from Unix - ANSI to PC - ANSI

Hi, I am creating a file in Unix using a shell script. The file is getting created in the Unix - ANSI format. My requirement is to convert it to the PC - ANSI format. Can anyone tell me how to do this? Thanks, Sunil (0 Replies)
Discussion started by: ssmallya
0 Replies

6. HP-UX

Unix_ANSI to PC-ANSI

I want to convert a file from Unix-ANSI to PC-ANSI format. How can i achieve that? (0 Replies)
Discussion started by: ssmallya
0 Replies

7. UNIX for Dummies Questions & Answers

How to access a struct within a struct?

Can someone tell me how to do this? Just a thought that entered my mind when learning about structs. First thought was: struct one { struct two; } struct two { three; } one->two->three would this be how you would access "three"? (1 Reply)
Discussion started by: unbelievable21
1 Replies

8. Programming

why the implementatoin of Bakery algorithm in ANSI C does not work in ANSI C

I follow the description of wiki (Lamport's bakery algorithm - Wikipedia, the free encyclopedia), then implement that algorithm in C, but it doesn't work, Starving is still here, is the implementation worry? Only print out: Thread ID: 0 START! Thread ID: 0 END! Thread ID: 0 START!... (2 Replies)
Discussion started by: sehang
2 Replies

9. Programming

Storing C++-struct in file - problem when adding new item in struct

Hi, I have received an application that stores some properties in a file. The existing struct looks like this: struct TData { UINT uSizeIncludingStrings; // copy of Telnet data struct UINT uSize; // basic properties: TCHAR szHost; //defined in Sshconfig UINT iPortNr; TCHAR... (2 Replies)
Discussion started by: Powerponken
2 Replies

10. Programming

C fdopen with and without -ansi

I have very little experience with gcc compilation under different environments, so please bear with me. I carried over 20 years old project into Ubuntu 18.04, it has old style K&R parameters, no function declarations to speak of, many functions without return are not declared void, and on and... (8 Replies)
Discussion started by: migurus
8 Replies
rsqrt(3M)																 rsqrt(3M)

NAME
rsqrt(), rsqrtf(), rsqrtl(), rsqrtw(), rsqrtq(), invsqrt(), invsqrtf(), invsqrtl(), invsqrtw(), invsqrtq() - reciprocal square root func- tions SYNOPSIS
DESCRIPTION
returns the reciprocal of the non-negative square root of x. The expression is intended as a higher performance alternative to The two expressions are comparably accurate, but do not compute exactly the same value in every case. For example, can be just slightly greater than 1, in rare cases. is equivalent to It is provided in HP-UX to facilitate importing code from other platforms. and are versions of and they take a argument and returns a result. and are a version of and they take a argument and returns a result. and are an version of and they take an argument and returns an result. On HP-UX systems, is equivalent to and is equivalent to USAGE
To use these functions compile either with the default option or with the and the options. To use or compile also with the option. To use any of these functions, make sure your program includes and link in the math library by specifying on the compiler or linker command line. RETURN VALUE
If x and raises the divide-by-zero exception. If x is +INFINITY, returns +0. If x is NaN, returns NaN. If x is less than zero, returns NaN and raises the invalid floating-point exception. raises the inexact exception whenever a rounded result does not equal the mathematical result. ERRORS
No errors are defined. SEE ALSO
sqrt(3M), math(5). STANDARDS CONFORMANCE
These functions are not specified by any standard. HP Integrity Server Only rsqrt(3M)
All times are GMT -4. The time now is 02:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy