OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 31-Mar-2004 16:59:46
Branch: OPENPKG_2_0_SOLID Handle: 2004033115594500
Modified files: (Branch: OPENPKG_2_0_SOLID)
openpkg-src/flex flex.patch flex.spec
Log:
MFC: replace incorrect patched functionality with cleanup version
Summary:
Revision Changes Path
1.8.2.1 +38 -29 openpkg-src/flex/flex.patch
1.68.2.2 +1 -1 openpkg-src/flex/flex.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/flex/flex.patch
============================================================================
$ cvs diff -u -r1.8 -r1.8.2.1 flex.patch
--- openpkg-src/flex/flex.patch 8 Feb 2004 18:29:32 -0000 1.8
+++ openpkg-src/flex/flex.patch 31 Mar 2004 14:59:45 -0000 1.8.2.1
@@ -1,32 +1,3 @@
-Index: filter.c
---- filter.c.orig 2003-03-25 17:39:08.000000000 +0100
-+++ filter.c 2004-02-07 13:21:59.000000000 +0100
-@@ -158,10 +158,10 @@
- int r;
-
- /* setup streams again */
-- if ((stdin = fdopen (0, "r")) == NULL)
-- flexfatal (_("fdopen(0) failed"));
-- if ((stdout = fdopen (1, "w")) == NULL)
-- flexfatal (_("fdopen(1) failed"));
-+ if ((freopen ("/dev/stdin", "r", stdin)) == NULL)
-+ flexfatal (_("freopen(stdin) failed"));
-+ if ((freopen ("/dev/stdout", "w", stdout)) == NULL)
-+ flexfatal (_("freopen(stdout) failed"));
-
- if ((r = chain->filter_func (chain)) == -1)
- flexfatal (_("filter_func failed"));
-@@ -181,8 +181,8 @@
- if (dup2 (pipes[1], 1) == -1)
- flexfatal (_("dup2(pipes[1],1)"));
- close (pipes[1]);
-- if ((stdout = fdopen (1, "w")) == NULL)
-- flexfatal (_("fdopen(1) failed"));
-+ if ((freopen ("/dev/stdout", "w", stdout)) == NULL)
-+ flexfatal (_("freopen(stdout) failed"));
-
- return true;
- }
Index: flex.skl
--- flex.skl.orig 2003-04-01 03:51:38.000000000 +0200
+++ flex.skl 2004-02-07 13:21:59.000000000 +0100
@@ -354,3 +325,41 @@
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(SECT2):
case YY_STATE_EOF(CODEBLOCK):
+Index: filter.c
+--- filter.c.orig 2003-03-25 17:39:08.000000000 +0100
++++ filter.c 2004-03-31 16:55:21.000000000 +0200
+@@ -158,10 +158,21 @@
+ int r;
+
+ /* setup streams again */
++#if 0
+ if ((stdin = fdopen (0, "r")) == NULL)
+ flexfatal (_("fdopen(0) failed"));
+ if ((stdout = fdopen (1, "w")) == NULL)
+ flexfatal (_("fdopen(1) failed"));
++#else
++ /* the above is theoretically correct, but on some
++ platforms (FreeBSD, Solaris, etc) not possible because
++ stdin/stdout/stderr are read-only. Unfortunately there is no
++ standardized alternative except the cheating solution: in
most
++ Unix stdio(3) implementations a FILE is nothing more than a
C
++ structure referencing a Unix filedescriptor. Hence one can
just
++ do nothing as long as the underlying filedescriptor was
already
++ changed. */
++#endif
+
+ if ((r = chain->filter_func (chain)) == -1)
+ flexfatal (_("filter_func failed"));
+@@ -181,8 +192,12 @@
+ if (dup2 (pipes[1], 1) == -1)
+ flexfatal (_("dup2(pipes[1],1)"));
+ close (pipes[1]);
++#if 0
+ if ((stdout = fdopen (1, "w")) == NULL)
+ flexfatal (_("fdopen(1) failed"));
++#else
++ /* do just nothing (reason: see above) */
++#endif
+
+ return true;
+ }
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/flex/flex.spec
============================================================================
$ cvs diff -u -r1.68.2.1 -r1.68.2.2 flex.spec
--- openpkg-src/flex/flex.spec 18 Feb 2004 14:49:02 -0000 1.68.2.1
+++ openpkg-src/flex/flex.spec 31 Mar 2004 14:59:45 -0000 1.68.2.2
@@ -39,7 +39,7 @@
Group: Language
License: BSD
Version: %{V_release}
-Release: 2.0.0
+Release: 2.0.1
# package options
%option with_beta yes
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]