Mail Archives: cygwin-developers/1998/12/18/13:41:48
This is a multi-part message in MIME format.
--------------97D1173197E78BD702A575EC
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Geoffrey Noer wrote:
>
> There are already quite a lot of functions in winsup that have protos
> in newlib. You're right that we'll have to add protos there for these
> functions but that's not a problem.
>
> Essentially, newlib is an embedded target libc/libm that Cygwin
> happens to use. Extended functionality that is of little use to a
> low-level embedded device really doesn't belong there so we put such
> things in winsup.
>
> It's not the ideal setup but it works and is hard to change so I try
> to live with it...
Convincing...
Attached are the patches to
newlib/libc/sys/cygwin/dirent.h
winsup/Makefile.in
winsup/cygwin.def
and the new file
winsup/scandir.c
Greetings,
Corinna
ChangeLog:
==========
Fri Dec 18 21:30:00 1998 Corinna Vinschen <corinna DOT vinschen AT cityweb DOT de>
* newlib/libc/sys/cygwin/sys/dirent.h: Added protos for
`scandir()' and `alphasort()'.
* cygwin.def: Added symbols for `scandir()' and `alphasort()'.
* Makefile.in: Added file `scandir.o' to dependencies.
* scandir.c: New file containing `scandir()' and `alphasort()'.
--------------97D1173197E78BD702A575EC
Content-Type: text/plain; charset=us-ascii; name="dirent.h-patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="dirent.h-patch"
--- dirent.h.orig Fri Dec 18 21:02:33 1998
+++ dirent.h Mon Dec 14 01:34:55 1998
@@ -43,4 +43,10 @@ struct dirent *readdir (DIR *);
void rewinddir (DIR *);
int closedir (DIR *);
+int scandir (const char *dir,
+ struct dirent ***namelist,
+ int (*select) (const struct dirent *),
+ int (*compar) (const struct dirent **, const struct dirent **));
+int alphasort (const struct dirent **a, const struct dirent **b);
+
#endif
--------------97D1173197E78BD702A575EC
Content-Type: text/plain; charset=us-ascii; name="Makefile.in-patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="Makefile.in-patch"
Index: Makefile.in
===================================================================
RCS file: /src/cvsroot/winsup-981214/Makefile.in,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile.in
--- Makefile.in 1998/12/17 02:24:57 1.2
+++ Makefile.in 1998/12/18 20:01:21
@@ -295,6 +295,7 @@ DLL_OFILES:=$(EXTRA_DLL_OFILES) \
pipe.o \
registry.o \
resource.o \
+ scandir.o \
security.o \
select.o \
shared.o \
--------------97D1173197E78BD702A575EC
Content-Type: text/plain; charset=us-ascii; name="cygwin.def-patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="cygwin.def-patch"
Index: cygwin.def
===================================================================
RCS file: /src/cvsroot/winsup-981214/cygwin.def,v
retrieving revision 1.1
diff -u -p -r1.1 cygwin.def
--- cygwin.def 1998/12/18 20:24:14 1.1
+++ cygwin.def 1998/12/18 20:22:18
@@ -542,6 +542,10 @@ scalbn
_scalbn = scalbn
scalbnf
_scalbnf = scalbnf
+scandir
+_scandir = scandir
+alphasort
+_alphasort = alphasort
scanf
_scanf = scanf
setbuf
--------------97D1173197E78BD702A575EC
Content-Type: application/x-unknown-content-type-cfile; name="scandir.c"
Content-Transfer-Encoding: x-uuencode
Content-Disposition: inline; filename="scandir.c"
begin 644 scandir.c
M"B-I;F-L=61E(#QD:7)E;G0N:#X*"FEN="!S8V%N9&ER*&-O;G-T(&-H87(@
M*F1I<BP@<W1R=6-T(&1I<F5N=" J*BIN86UE;&ES="P*(" @(" @(" @(" @
M:6YT("@J<V5L96-T*2AC;VYS="!S=')U8W0 AT 9&ER96YT("HI+ H@(" @(" @
M(" @("!I;G0@*"IC;VUP87(I*&-O;G-T('-T<G5C="!D:7)E;G0@*BHL(&-O
M;G-T('-T<G5C="!D:7)E;G0@*BHI*0I["B @(" @(" @1$E2("ID:7)P.PH@
M(" @(" @('-T<G5C="!D:7)E;G0@*F5N="P@*F5T;7 L("HJ;FP@/2!.54Q,
M+" J*FYT;7 ["B @(" @(" @:6YT(&-O=6YT(#T@,#L*"B @(" @(" @:68@
M*"$@*&1I<G @/2!O<&5N9&ER*&1I<BDI*0H@(" @(" @(" @(" @(" @<F5T
M=7)N("TQ.PH@(" @(" @('=H:6QE("AE;G0@/2!R96%D9&ER*&1I<G I*2![
M"B @(" @(" @(" @(" @("!I9B H(2!S96QE8W0@?'P@<V5L96-T*&5N="DI
M('L*(" @(" @(" @(" @(" @(" @(" @(" @:68@*"$@*&5T;7 @/2 H<W1R
M=6-T(&1I<F5N=" J*2!M86QL;V,H<VEZ96]F("IE;G0I*2D*(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @("!G;W1O(&5R<F]R.PH@(" @(" @(" @
M(" @(" @(" @(" @(" J971M<" ]("IE;G0["B @(" @(" @(" @(" @(" @
M(" @(" @(&YT;7 @/2 H<W1R=6-T(&1I<F5N=" J*BD*(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @("!R96%L;&]C*&YL+" H8V]U;G0@*R Q*2 J
M('-I>F5O9B J;FPI.PH@(" @(" @(" @(" @(" @(" @(" @("!I9B H(2!N
M=&UP*2!["B @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @9G)E92AE
M=&UP*3L*(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @("!G;W1O(&5R
M<F]R.PH@(" @(" @(" @(" @(" @(" @(" @("!]"B @(" @(" @(" @(" @
M(" @(" @(" @(&YL(#T@;G1M<#L*(" @(" @(" @(" @(" @(" @(" @(" @
M;FQ;8V]U;G0K*UT@/2!E=&UP.PH@(" @(" @(" @(" @(" @?0H@(" @(" @
M('T*(" @(" @("!C;&]S961I<BAD:7)P*3L*(" @(" @("!Q<V]R="AN;"P@
M8V]U;G0L('-I>F5O9B J;FPL"B @(" @(" @(" @(" @*&EN=" H*BDH8V]N
M<W0@=F]I9" J+"!C;VYS="!V;VED("HI*2!C;VUP87(I.PH@(" @(" @(&EF
M("AN86UE;&ES="D*(" @(" @(" @(" @(" @("IN86UE;&ES=" ](&YL.PH@
M(" @(" @(')E='5R;B!C;W5N=#L*97)R;W(Z"B @(" @(" @:68@*&YL*2![
M"B @(" @(" @(" @(" @("!W:&EL92 H8V]U;G0@/B P*0H@(" @(" @(" @
M(" @(" @(" @(" @("!F<F5E*&YL6RTM8V]U;G1=*3L*(" @(" @(" @(" @
M(" @(&9R964H;FPI.PH@(" @(" @('T*(" @(" @("!R971U<FX@+3$["GT*
M"FEN="!A;'!H87-O<G0H8V]N<W0@<W1R=6-T(&1I<F5N=" J*F$L(&-O;G-T
M('-T<G5C="!D:7)E;G0@*BIB*0I["B @(" @(" @<F5T=7)N('-T<F-M<"@H
?*F$I+3YD7VYA;64L("@J8BDM/F1?;F%M92D["GT*"@
end
--------------97D1173197E78BD702A575EC--
- Raw text -