summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowitz@users.sourceforge.net>2011-08-21 15:16:39 -0500
committerYaakov Selkowitz <yselkowitz@users.sourceforge.net>2011-08-21 15:16:39 -0500
commit1752a9ea877a74ea71810e0115e3fda5e25ef58b (patch)
tree2f9f163a45b2e645ece768f37e612c6c4c218c1a
parente6248894f5d532ede509379aa0f2b2e6f58dc4f4 (diff)
downloadcygwin-1752a9ea877a74ea71810e0115e3fda5e25ef58b.tar.gz
cygwin-1752a9ea877a74ea71810e0115e3fda5e25ef58b.tar.xz
cygwin-1752a9ea877a74ea71810e0115e3fda5e25ef58b.zip
cygwin 1.7.9-3
- Added _PATH_MAILDIR and _PATH_SHELLS to <paths.h>. - Added strdupa and strndupa to <string.h>. - Header fixes for <process.h> and <unistd.h>.
-rw-r--r--cygwin-1.7.9-paths.h.patch19
-rw-r--r--cygwin-1.7.9-process.h.patch48
-rw-r--r--cygwin-1.7.9-strdupa.patch28
-rw-r--r--cygwin-1.7.9-unistd.h.patch20
-rw-r--r--cygwin.spec37
5 files changed, 137 insertions, 15 deletions
diff --git a/cygwin-1.7.9-paths.h.patch b/cygwin-1.7.9-paths.h.patch
new file mode 100644
index 0000000..ca4bd52
--- /dev/null
+++ b/cygwin-1.7.9-paths.h.patch
@@ -0,0 +1,19 @@
+===================================================================
+RCS file: /cvs/src/src/winsup/cygwin/include/paths.h,v
+retrieving revision 1.6
+diff -u -p -r1.6 paths.h
+--- src/winsup/cygwin/include/paths.h 2 Nov 2010 17:38:36 -0000 1.6
++++ src/winsup/cygwin/include/paths.h 19 Aug 2011 20:08:11 -0000
+@@ -17,10 +17,12 @@ details. */
+ #define _PATH_DEV "/dev/"
+ #define _PATH_DEVNULL "/dev/null"
+ #define _PATH_LASTLOG "/var/log/lastlog"
++#define _PATH_MAILDIR "/var/spool/mail/"
+ #define _PATH_MAN "/usr/share/man"
+ #define _PATH_MEM "/dev/mem"
+ #define _PATH_MNTTAB "/etc/fstab"
+ #define _PATH_MOUNTED "/etc/mtab"
++#define _PATH_SHELLS "/etc/shells"
+ #define _PATH_STDPATH "/bin:/usr/sbin:/sbin"
+ #define _PATH_TMP "/tmp/"
+ #define _PATH_TTY "/dev/tty"
diff --git a/cygwin-1.7.9-process.h.patch b/cygwin-1.7.9-process.h.patch
new file mode 100644
index 0000000..9f5f8c2
--- /dev/null
+++ b/cygwin-1.7.9-process.h.patch
@@ -0,0 +1,48 @@
+===================================================================
+RCS file: /cvs/src/src/newlib/libc/include/process.h,v
+retrieving revision 1.4
+retrieving revision 1.5
+diff -u -r1.4 -r1.5
+--- src/newlib/libc/include/process.h 2002/06/11 02:26:43 1.4
++++ src/newlib/libc/include/process.h 2011/08/19 14:29:34 1.5
+@@ -1,4 +1,5 @@
+-/* process.h. This file comes with MSDOS and WIN32 systems. */
++/* process.h. Define spawn family of functions as provided by Cygwin.
++ The original file of this name is a MS/DOS invention. */
+
+ #ifndef __PROCESS_H_
+ #define __PROCESS_H_
+@@ -7,15 +8,7 @@
+ extern "C" {
+ #endif
+
+-int execl(const char *path, const char *argv0, ...);
+-int execle(const char *path, const char *argv0, ... /*, char * const *envp */);
+-int execlp(const char *path, const char *argv0, ...);
+-int execlpe(const char *path, const char *argv0, ... /*, char * const *envp */);
+-
+-int execv(const char *path, char * const *argv);
+-int execve(const char *path, char * const *argv, char * const *envp);
+-int execvp(const char *path, char * const *argv);
+-int execvpe(const char *path, char * const *argv, char * const *envp);
++/* For the exec functions, include unistd.h. */
+
+ int spawnl(int mode, const char *path, const char *argv0, ...);
+ int spawnle(int mode, const char *path, const char *argv0, ... /*, char * const *envp */);
+===================================================================
+RCS file: /cvs/src/src/newlib/libc/include/sys/unistd.h,v
+retrieving revision 1.78
+retrieving revision 1.79
+diff -u -r1.78 -r1.79
+--- src/newlib/libc/include/sys/unistd.h 2011/07/20 01:14:50 1.78
++++ src/newlib/libc/include/sys/unistd.h 2011/08/19 14:29:34 1.79
+@@ -46,6 +46,9 @@
+ int _EXFUN(execl, (const char *__path, const char *, ... ));
+ int _EXFUN(execle, (const char *__path, const char *, ... ));
+ int _EXFUN(execlp, (const char *__file, const char *, ... ));
++#if defined(__CYGWIN__)
++int _EXFUN(execlpe, (const char *__file, const char *, ... ));
++#endif
+ int _EXFUN(execv, (const char *__path, char * const __argv[] ));
+ int _EXFUN(execve, (const char *__path, char * const __argv[], char * const __envp[] ));
+ int _EXFUN(execvp, (const char *__file, char * const __argv[] ));
diff --git a/cygwin-1.7.9-strdupa.patch b/cygwin-1.7.9-strdupa.patch
new file mode 100644
index 0000000..d1ec29e
--- /dev/null
+++ b/cygwin-1.7.9-strdupa.patch
@@ -0,0 +1,28 @@
+===================================================================
+RCS file: /cvs/src/src/newlib/libc/include/string.h,v
+retrieving revision 1.28
+retrieving revision 1.29
+diff -u -r1.28 -r1.29
+--- src/newlib/libc/include/string.h 2011/05/25 18:41:10 1.28
++++ src/newlib/libc/include/string.h 2011/06/10 18:30:38 1.29
+@@ -96,6 +96,20 @@
+ int _EXFUN(strtosigno, (const char *__name));
+ #endif
+
++#if defined _GNU_SOURCE && defined __GNUC__
++#define strdupa(__s) \
++ (__extension__ ({const char *__in = (__s); \
++ size_t __len = strlen (__in) + 1; \
++ char * __out = (char *) __builtin_alloca (__len); \
++ (char *) memcpy (__out, __in, __len);}))
++#define strndupa(__s, __n) \
++ (__extension__ ({const char *__in = (__s); \
++ size_t __len = strnlen (__in, (__n)) + 1; \
++ char *__out = (char *) __builtin_alloca (__len); \
++ __out[__len-1] = '\0'; \
++ (char *) memcpy (__out, __in, __len-1);}))
++#endif /* _GNU_SOURCE && __GNUC__ */
++
+ /* These function names are used on Windows and perhaps other systems. */
+ #ifndef strcmpi
+ #define strcmpi strcasecmp
diff --git a/cygwin-1.7.9-unistd.h.patch b/cygwin-1.7.9-unistd.h.patch
new file mode 100644
index 0000000..579d0ae
--- /dev/null
+++ b/cygwin-1.7.9-unistd.h.patch
@@ -0,0 +1,20 @@
+===================================================================
+RCS file: /cvs/src/src/newlib/libc/include/sys/unistd.h,v
+retrieving revision 1.77
+retrieving revision 1.78
+diff -u -r1.77 -r1.78
+--- src/newlib/libc/include/sys/unistd.h 2010/10/08 15:28:49 1.77
++++ src/newlib/libc/include/sys/unistd.h 2011/07/20 01:14:50 1.78
+@@ -487,10 +487,11 @@
+ #define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS 16
+ #define _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS 17
+ #define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS
++#define _CS_XBS5_WIDTH_RESTRICTED_ENVS _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS
+ #define _CS_POSIX_V7_THREADS_CFLAGS 18
+ #define _CS_POSIX_V7_THREADS_LDFLAGS 19
+ #define _CS_V7_ENV 20
+-#define _CS_V6_ENV _CS_V6_ENV
++#define _CS_V6_ENV _CS_V7_ENV
+ #endif
+
+ #ifndef __CYGWIN__
diff --git a/cygwin.spec b/cygwin.spec
index 7fb6a45..113936c 100644
--- a/cygwin.spec
+++ b/cygwin.spec
@@ -6,7 +6,7 @@
Name: cygwin
Version: 1.7.9
-Release: 2%{?dist}
+Release: 3
Summary: Cygwin cross-compiler runtime
License: GPLv2 with exceptions
@@ -18,6 +18,10 @@ BuildArch: noarch
Source0: ftp://sourceware.org/pub/cygwin/release/cygwin/cygwin-%{version}-1-src.tar.bz2
Patch0: cygwin-1.7.9-fenv.h.patch
Patch1: cygwin-1.7.9-sysmacros.h.patch
+Patch2: cygwin-1.7.9-paths.h.patch
+Patch3: cygwin-1.7.9-process.h.patch
+Patch4: cygwin-1.7.9-strdupa.patch
+Patch5: cygwin-1.7.9-unistd.h.patch
BuildRequires: cygwin-filesystem >= 2
BuildRequires: cygwin-binutils
@@ -37,6 +41,10 @@ Cygwin cross-compiler runtime, base libraries.
%setup -q -n cygwin-%{version}-1
%patch0 -p1
%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
# code still has some warnings with gcc4.5 (remove for 1.7.10)
sed -i -e 's| -Werror | |' winsup/cygwin/Makefile.in
@@ -47,7 +55,7 @@ mkdir -p build
pushd build
../configure \
- --prefix=%{_prefix} \
+ --prefix=%{_cygwin_prefix} \
--build=%_build --host=%_host \
--target=%{_cygwin_target}
@@ -60,21 +68,15 @@ popd
rm -rf $RPM_BUILD_ROOT
pushd build
-make DESTDIR=$RPM_BUILD_ROOT install
+make DESTDIR=$RPM_BUILD_ROOT install tooldir=%{_cygwin_prefix}
# remove files not needed for cross-compiling
-rm -fr $RPM_BUILD_ROOT%{_prefix}/etc
-rm -fr $RPM_BUILD_ROOT%{_bindir}/cygserver-config
-rm -fr $RPM_BUILD_ROOT%{_sbindir}
-rm -fr $RPM_BUILD_ROOT%{_infodir}
-rm -fr $RPM_BUILD_ROOT%{_mandir}
-rm -fr $RPM_BUILD_ROOT%{_datadir}/doc/
-rm -fr $RPM_BUILD_ROOT%{_prefix}/%{_cygwin_target}/share/doc/
-# make install places these in nonstandard locations, so move them.
-mkdir -p $RPM_BUILD_ROOT%{_cygwin_bindir}
-mv $RPM_BUILD_ROOT%{_bindir}/* $RPM_BUILD_ROOT%{_cygwin_bindir}
-mv $RPM_BUILD_ROOT%{_prefix}/%{_cygwin_target}/include $RPM_BUILD_ROOT%{_cygwin_prefix}/
-mv $RPM_BUILD_ROOT%{_prefix}/%{_cygwin_target}/lib $RPM_BUILD_ROOT%{_cygwin_prefix}/
+rm -fr $RPM_BUILD_ROOT%{_cygwin_prefix}/etc
+rm -fr $RPM_BUILD_ROOT%{_cygwin_bindir}/cygserver-config
+rm -fr $RPM_BUILD_ROOT%{_cygwin_sbindir}
+rm -fr $RPM_BUILD_ROOT%{_cygwin_docdir}
+rm -fr $RPM_BUILD_ROOT%{_cygwin_infodir}
+rm -fr $RPM_BUILD_ROOT%{_cygwin_mandir}
# these are provided by other packages
rm -fr $RPM_BUILD_ROOT%{_cygwin_includedir}/iconv.h
@@ -96,6 +98,11 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Sun Aug 21 2011 Yaakov Selkowitz <yselkowitz@users.sourceforge.net> - 1.7.9-3
+- Added _PATH_MAILDIR and _PATH_SHELLS to <paths.h>.
+- Added strdupa and strndupa to <string.h>.
+- Header fixes for <process.h> and <unistd.h>.
+
* Thu Apr 28 2011 Yaakov Selkowitz <yselkowitz@users.sourceforge.net> - 1.7.9-2
- Header fixes for <fenv.h> and <sys/sysmacros.h>.