Discussion:
[PATCH] AIX NFS patches part1
g***@pie-dabas.net
2018-09-20 09:40:47 UTC
Permalink
Hello all,

I have collection of some AIX specific patches, to fix wildcards and path
completion, if used on NFS mounted filesystems.

As a beginner in GNU contributions, i was not able to format in proper
way. Sorry about that. Anyway, i will put my work here, and if possible,
format it better in future :) Here it is against latest 5.0 beta. First
patch was for bash-4.4.

bash-4.4$ /usr/local/diffutils-3.6/bin/diff
bash-5.0-beta-orig/lib/glob/glob.c bash-5.0-beta-aix/lib/glob/glob.c
598a599,609
/* Fixes AIX and NFS server on Linux issues, with 64-bit i-nodes.
DIR->DIR64, dirent->dirent64, opendir->opendir64
readdir->readdir64, closedir->closedir64
Original patch v0.1, Gatis Visnevskis, 2016-Dec-09
Improved patch v0.2, Gatis Visnevskis, 2018-Sep-18 */
#if defined (_AIX)
DIR64 *d;
register struct dirent64 *dp;
#else
600a612
#endif
714a727,730
/* AIX NFS 64-bit i-node patch v0.2 */
#if defined(_AIX)
d = opendir64 (dir);
#else
715a732
#endif
750a768,771
/* AIX NFS 64-bit i-node patch v0.2 */
#if defined(_AIX)
dp = readdir64 (d);
#else
751a773,774
#endif
871a895,898
/* AIX NFS 64-bit i-node patch v0.2 */
#if defined(_AIX)
(void) closedir64 (d);
#else
872a900,901
#endif
Gatis
Chet Ramey
2018-09-20 18:51:44 UTC
Permalink
Post by g***@pie-dabas.net
Hello all,
I have collection of some AIX specific patches, to fix wildcards and path
completion, if used on NFS mounted filesystems.
As a beginner in GNU contributions, i was not able to format in proper
way. Sorry about that. Anyway, i will put my work here, and if possible,
format it better in future :) Here it is against latest 5.0 beta. First
patch was for bash-4.4.
The answer from

https://lists.gnu.org/archive/html/bug-bash/2015-08/msg00054.html

about opendir64/readdir64/closedir64 still stands.

You might also look at

https://lists.gnu.org/archive/html/bug-bash/2015-08/msg00011.html
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU ***@case.edu http://tiswww.cwru.edu/~chet/
g***@pie-dabas.net
2018-09-20 22:57:05 UTC
Permalink
Thanks for pointing to old threads.
I was able to find root cause of this issue, somewhere in LKML.
And was forced to patch and recompile some more freeware tools, like "tar"
and "make", used in our development environment.

Sad truth about all that - lack of consistent LARGEFILE support in GNU
header files and Makefiles/autoconfig/etc...

There is no magic - someone has to write some code between #if and #endif :(

Gatis
Post by Chet Ramey
Post by g***@pie-dabas.net
Hello all,
I have collection of some AIX specific patches, to fix wildcards and path
completion, if used on NFS mounted filesystems.
As a beginner in GNU contributions, i was not able to format in proper
way. Sorry about that. Anyway, i will put my work here, and if possible,
format it better in future :) Here it is against latest 5.0 beta. First
patch was for bash-4.4.
The answer from
https://lists.gnu.org/archive/html/bug-bash/2015-08/msg00054.html
about opendir64/readdir64/closedir64 still stands.
You might also look at
https://lists.gnu.org/archive/html/bug-bash/2015-08/msg00011.html
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey
2018-09-20 23:03:09 UTC
Permalink
Post by g***@pie-dabas.net
Thanks for pointing to old threads.
I was able to find root cause of this issue, somewhere in LKML.
And was forced to patch and recompile some more freeware tools, like "tar"
and "make", used in our development environment.
Sad truth about all that - lack of consistent LARGEFILE support in GNU
header files and Makefiles/autoconfig/etc...
There is no magic - someone has to write some code between #if and #endif :(
Yes. My answer assumes you're using the `standard' AIX header files, which
should #define opendir as opendir64 if _LARGE_FILES is defined. Similarly
for dirent64/readdir64/closedir64.

If you're using replacement GNU header files, yes, similar code will have
to be in those header files.

Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU ***@case.edu http://tiswww.cwru.edu/~chet/
Loading...