![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| SuSE SUSE Linux is a major operating system. The developer rights are owned by Novell, Inc. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem shmat in HP-UX Titanium ia64. EINVAL Error | dairby | High Level Programming | 3 | 08-04-2009 10:22 AM |
| GUI problem with Suse Linux | mac4rfree | SuSE | 2 | 11-12-2008 02:20 AM |
| HP-UX 11.23 ia64 and Glance | LisaS | UNIX for Dummies Questions & Answers | 2 | 01-03-2008 01:38 PM |
| SuSE parted problem | Mudrack | SuSE | 0 | 06-12-2006 11:10 AM |
| SuSE 8.1 NIC problem | norsk hedensk | UNIX for Dummies Questions & Answers | 2 | 04-07-2003 10:54 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
problem of readdir on IA64 suse
Dear Experts,
i am trying to find whether the given name is file or a directory Code:
dirp = opendir(dirname);
direntp = readdir(dirp);
if(direntp->d_type & DT_DIR)
{
printf("\n is a dirctory");
}
else
{
//dir_or_file = Mtrue;
printf("\n not a directory");
}
thanks in advance. |
|
||||
|
are the versions of the libraries you are calling identical on both? Have you looked at both libraries and header files you are using? I am assuming this is C code, as if you were using a shell you could use the built in test function to test for directories or not.
Have you checked any intel documentation? |
|
||||
|
Dear experts,
thank you for the reply, no both of them are not the same version. can you please what is the reason why this is failing in ia64 , version i have got 2.6.16,whether it is version dependent or any calls have been replaced, apart from comparison with Red Hat linux i just wanted to know is it a common issue or specific. Code:
direntp->d_type & DT_DIR |
|
||||
|
Wait.....regardless of them being 64bit, is the Red Hat machine ia64 (Itanium) or is it x86-64 or some other architecture? If it is not, ia64 is a totally different instruction set with different compilers and libraries and function calls.
|
|
||||
|
That is very possible. Just because they are both 64bit does not mean they both behave the same way.
ia64 is a totally different instruction set with different compile and runtime options. I would look over the documentation as I am not adept at coding enough to make any sort of recommendation here, but it would be a somewhat safe choice to think that different architectures might behave differently with different levels of libraries. ---------- Post updated at 02:45 PM ---------- Previous update was at 08:43 AM ---------- I just spoke to another admin here who is a C coder. His suggestion is remove this: ->d_type & DT_DIR and make your code look like this: dirp = opendir(dirname); direntp = readdir(dirp); if(direntp) { printf("\n is a dirctory"); } else { //dir_or_file = Mtrue; printf("\n not a directory"); } And it should work on both |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|