Movatterモバイル変換
[0]ホーム
This is the mail archive of thelibc-alpha@sourceware.orgmailing list for theglibc project.
Re: [PATCH v2 00/18] posix: glob fixes and refactor
On 08/17/2017 10:32 AM, Adhemerval Zanella wrote:
My understanding from Florian comment is the 'decoupled' version would be thecode with both win32/amiga/etc code striped and LIBC defines set to only glibc.Would it be acceptable for gnulib?
We don't need Amiga code any more. MS-Windows support is still used,though. However, the current style in glob.c with the forest of ifdefsis pretty bad, and it'd be good to see it go. Instead, I'd rather havethe Gnulib-specific stuff put into a section that is relativelyindependent of the rest of the code. To do that, I suggest that you justrip out all the MS-Windows code, and I'll do my best to reintroduce itin a cleaner way.This would also remove the d_ino/d_type abstraction macros.
We'll still need some form of abstraction. For fts.c Gnulib is usingsomething like the following, and we could do this sort of thing inglob.c too. It's not much of a burden to write 'D_INO (dp)' instead of'dp->d_ino' in the mainline code.#if defined _LIBC || defined D_INO_IN_DIRENT# define D_INO(dp) (dp)->d_ino#else# define D_INO(dp) 0#endif
By the way, I've lost track: have you looked at the Gnulib fixes forglob.c, and merged them into your glibc patch?
[8]ページ先頭