Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Porting C code from Sun Solaris to IBM AIX

Posted on 1997-04-24
4
Medium Priority
?
1,135 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 20 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

While Plesk offers many potential benefits to website administrators, including compatibility with Windows Server and other leading technologies, the company has also been working to differentiate it from other control panels for content management…
Steps to fix error: “Couldn’t mount the database that you specified. Specified database: HU-DB; Error code: An Active Manager operation fail”
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses

879 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