Solved

Porting C code from Sun Solaris to IBM AIX

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

This article shows how to convert a multi-page PDF file into multiple image files, with one image file created for each page of the PDF. It does this by utilizing an excellent, free software package called GraphicsMagick. The solution is amazingly s…
Storage devices are generally used to save the data or sometime transfer the data from one computer system to another system. However, sometimes user accidentally erased their important data from the Storage devices. Users have to know how data reco…
The viewer will learn how to create multiple layers to apply various filters and how to delete areas from each layer’s filter.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

707 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now