Bug 64467 - dirent and dirent64 are different when _FILE_OFFSET_BITS=64
Summary: dirent and dirent64 are different when _FILE_OFFSET_BITS=64
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
(Show other bugs)
Version: 7.2
Hardware: All Linux
medium
low
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-05-05 22:00 UTC by Dimitri Papadopoulos
Modified: 2016-11-24 15:17 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-12-15 20:12:39 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
compile this C++ source file to reproduce (397 bytes, text/plain)
2002-05-05 22:01 UTC, Dimitri Papadopoulos
no flags Details

Description Dimitri Papadopoulos 2002-05-05 22:00:13 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2.1) Gecko/20010901

Description of problem:
In the large file compilation environment (_FILE_OFFSET_BITS set to 64) "dirent"
and "dirent64" are different types but "dirent" should really be typedef'ed to
"dirent64" so that these are the same type. Because of this minor bug I get
warnings when using the Intel C/C++ compiler:
"foo.cc", line 19: warning #556: a value of type "dirent64 *" cannot be assigned
to an entity of type "dirent *"


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Get an Intel C/C++ compiler. There's a demo version.
2. Compile the attached file foo.cc:
   	icpc -c foo.cc



Actual Results:  The Intel C++ compiler warns that "dirent" and "dirent64" are
different types.

Expected Results:  "dirent" and "dirent64" should be the same type in
<bits/dirent.h> when __USE_FILE_OFFSET64 is defined.

Additional info:

The complete output of the Intel C++ compiler is:

$ icpc -c foo.cc
foo.cc:
"foo.cc", line 19: warning #556: a value of type "dirent64 *" cannot be assigned
to an entity of type "dirent *"
        file = readdir(dir);
             ^

$

Comment 1 Dimitri Papadopoulos 2002-05-05 22:01:48 UTC
Created attachment 56406 [details]
compile this C++ source file to reproduce

Comment 2 Jakub Jelinek 2002-05-10 14:25:21 UTC
The problem is that either icc lacks reasonable function redirect, or glibc
doesn't know how to do it for it and thus has to fall back to #define
which has this problem.
If you know how to code <sys/cdefs.h> __REDIRECT macro for icc, feel free
to submit patch...


Note You need to log in before you can comment on or make changes to this bug.