Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Porting C code from Sun Solaris to IBM AIX

Posted on 1997-04-24
4
1,086 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all 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.
Let’s list some of the technologies that enable smooth teleworking. 
The viewer will learn common shortcuts with easy ways to remember them. The viewer will then learn where to find all of the keyboard shortcuts, how to create/change them, and how to speed up their workflow.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

828 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