Solved

Porting C code from Sun Solaris to IBM AIX

Posted on 1997-04-24
4
1,084 Views
Last Modified: 2013-12-05
I'm having problems porting C code written in Sun Solaris to IBM AIX. It seems that the 2 header files <time.h> and <sys/time.h> in the AIX version is not linked (compared to Solaris) and bound by the following code

#ifdef  _BSD_INCLUDES
#include <time.h>
#endif  /* _BSD_INCLUDES */

Is there any setting that needs to be configured in the C environment? Which standard does IBM AIX comform to (BSD or System V)?

The following errors were generated during compilation when the tm structure in <time.h> is placed together with timeval & timezone structures <sys/time.h> inside the same source file.

"fepfunc1.c", line 59.11: 1506-117 (S) Operand must be a scalar type.
"fepfunc1.c", line 62.17: 1506-022 (S) "tm_year" is not a member of "struct tm".
"fepfunc1.c", line 63.17: 1506-022 (S) "tm_mon" is not a member of "struct tm".
"fepfunc1.c", line 64.17: 1506-022 (S) "tm_mday" is not a member of "struct tm".
"fepfunc1.c", line 94.11: 1506-117 (S) Operand must be a scalar type.
"fepfunc1.c", line 97.25: 1506-022 (S) "tm_hour" is not a member of "struct tm".
"fepfunc1.c", line 98.25: 1506-022 (S) "tm_min" is not a member of "struct tm".
"fepfunc1.c", line 135.16: 1506-098 (E) Missing argument(s).
"fepfunc1.c", line 136.11: 1506-117 (S) Operand must be a scalar type.
0
Comment
Question by:derick042497
4 Comments
 

Author Comment

by:derick042497
ID: 1250118
I appreciate if anyone could provide some answers to my problems.

Thank you.
0
 
LVL 6

Expert Comment

by:jpk041897
ID: 1250119
Haven't touche AIX since it was in Beta. Had a hell of a time with it at that so I can't give much in the way of info, but for what its worth:

AIX is a non standard implementation of System V R 3.2. The spooling mechanism is completley unique and IPC's are (or were the last time I used it) rather strange. (As in sometimes they work, sometimes they don't)
0
 
LVL 4

Expert Comment

by:jos010697
ID: 1250120
I suspect this to be a stray question, because I already
answered it a couple of weeks ago (and received my
eternal glory and honors for it ;-)

kind regards,

Jos
0
 
LVL 1

Accepted Solution

by:
ian010997 earned 10 total points
ID: 1250121
Convert all you functions that use the time.h header file to POSIX.  Pick up a copy of POSIX Programmmers's Guide by Donald Lewine.  It will solve a 1,000,000 porting problems :)
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A high-level exploration of how our ever-increasing access to information has changed the way we do our jobs.
I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
The viewer will learn how to set up a document for the web and print and the recommended PPI for printing.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question