ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General Discussion » C functions availability on different OS

Post new topic  Reply to topic
 C functions availability on different OS « View previous topic :: View next topic » 
Author Message
ktg
PostPosted: Thu Aug 21, 2008 1:06 am    Post subject: C functions availability on different OS Reply with quote

Centurion

Joined: 09 Jan 2006
Posts: 138
Location: India

Hi All,

How to check whether a C function is available on given system/OS other than by trying 'man' for the function or through compilation error?

For ex. strerror_r is available on Linux but not on Solaris. man strerror_r on Solaris fails.

TIA,
Kalpana
Back to top
View user's profile Send private message AIM Address
Gaya3
PostPosted: Thu Aug 21, 2008 2:18 am    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

you cant compare unix/linux compiler and solaris compiler as it is.

there are quite some difference, how it is handling in the kernel level calls too.

you should go through C code portability part, (please search about this)
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
bruce2359
PostPosted: Thu Aug 21, 2008 5:20 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

The vendor-supplied application programming reference manual is the place to see if a given c function is supported or not.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
jsware
PostPosted: Thu Aug 21, 2008 5:23 am    Post subject: Re: C functions availability on different OS Reply with quote

Chevalier

Joined: 17 May 2001
Posts: 455

ktg wrote:
For ex. strerror_r is available on Linux but not on Solaris. man strerror_r on Solaris fails.
The strerror function is thread safe on Solaris, but not on Linux. See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6223913 for a description of strerror vs strerror_r on Solaris/Linux.
_________________
Regards
John
The pain of low quaility far outlasts the joy of low price.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Aug 21, 2008 5:24 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

#if defined
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Thu Aug 21, 2008 7:35 pm    Post subject: Reply with quote

Jedi Knight

Joined: 25 Mar 2003
Posts: 2538
Location: Melbourne, Australia

grep funcname /usr/lib/include/*.h /usr/lib/include/sys/*.h
and then go looking in the matched .h files, as there may be #ifdef around the function prototype.

As state previously, the vendor documentation is the definative way to go.

Do you have any particular function in mind? Nearly all of the standard C run-time functions are available on all platforms that support a C compiler.
_________________
Glenn
Back to top
View user's profile Send private message
ktg
PostPosted: Fri Aug 22, 2008 5:32 am    Post subject: Reply with quote

Centurion

Joined: 09 Jan 2006
Posts: 138
Location: India

Thanks every one.

I was looking for strerror_r in Solaris. This function is not available on Solaris 8 but is available on Solaris 10.

man libc gave the functions available on the system. But, I could not get free/online Appication programming reference for Solaris 8

Regards,
Kalpana
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » C functions availability on different OS
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.