Hello community,

here is the log from the commit of package libedit for openSUSE:Factory checked 
in at 2012-03-19 10:06:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libedit (Old)
 and      /work/SRC/openSUSE:Factory/.libedit.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libedit", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:Factory/libedit/libedit.changes  2012-02-24 
12:05:38.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.libedit.new/libedit.changes     2012-03-19 
10:06:47.000000000 +0100
@@ -1,0 +2,7 @@
+Tue Mar 13 01:51:31 UTC 2012 - [email protected]
+
+-  open all FDs with O_CLOEXEC in the library code.
+-  use gcc visibility by just reusing upstream macros "public"
+   and "protected"
+
+-------------------------------------------------------------------

New:
----
  libedit-ocloexec.patch
  libedit-visibility.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libedit.spec ++++++
--- /var/tmp/diff_new_pack.ZFaEee/_old  2012-03-19 10:06:49.000000000 +0100
+++ /var/tmp/diff_new_pack.ZFaEee/_new  2012-03-19 10:06:49.000000000 +0100
@@ -35,7 +35,8 @@
 Source1:        README.SuSE
 Source2:        baselibs.conf
 Patch2:         libedit-20100424-3.0-ncurses.patch
-#
+Patch3:         libedit-ocloexec.patch
+Patch4:         libedit-visibility.patch
 Summary:        Command Line Editing and History Library
 License:        BSD-3-Clause
 Group:          Development/Libraries/C and C++
@@ -74,10 +75,11 @@
 This package holds the development files for libedit.
 
 %prep
-%setup -n %{pkg_name}-%{pkg_version}
+%setup -q -n %{pkg_name}-%{pkg_version}
 %{__cp} %{S:1} .
 %patch2
-
+%patch3 -p1
+%patch4 -p1
 %build
 NOCONFIGURE=1 autoreconf -fiv
 %configure --disable-static --with-pic \

++++++ libedit-ocloexec.patch ++++++
Index: libedit-20110802-3.0/src/readline.c
===================================================================
--- libedit-20110802-3.0.orig/src/readline.c
+++ libedit-20110802-3.0/src/readline.c
@@ -1175,15 +1175,15 @@ history_truncate_file (const char *filen
 
        if (filename == NULL && (filename = _default_history_file()) == NULL)
                return errno;
-       if ((fp = fopen(filename, "r+")) == NULL)
+       if ((fp = fopen(filename, "r+e")) == NULL)
                return errno;
        strcpy(template, _history_tmp_template);
-       if ((fd = mkstemp(template)) == -1) {
+       if ((fd = mkostemp(template, O_CLOEXEC)) == -1) {
                ret = errno;
                goto out1;
        }
 
-       if ((tp = fdopen(fd, "r+")) == NULL) {
+       if ((tp = fdopen(fd, "r+e")) == NULL) {
                close(fd);
                ret = errno;
                goto out2;
Index: libedit-20110802-3.0/src/vi.c
===================================================================
--- libedit-20110802-3.0.orig/src/vi.c
+++ libedit-20110802-3.0/src/vi.c
@@ -37,6 +37,7 @@
 #include <unistd.h>
 #include <limits.h>
 #include <sys/wait.h>
+#include <fcntl.h>
 
 #if !defined(lint) && !defined(SCCSID)
 #if 0
@@ -1015,7 +1016,7 @@ vi_histedit(EditLine *el, Int c __attrib
                        return CC_ERROR;
        }
 
-       fd = mkstemp(tempfile);
+       fd = mkostemp(tempfile, O_CLOEXEC);
        if (fd < 0)
                return CC_ERROR;
        len = (size_t)(el->el_line.lastchar - el->el_line.buffer);
Index: libedit-20110802-3.0/src/el.c
===================================================================
--- libedit-20110802-3.0.orig/src/el.c
+++ libedit-20110802-3.0/src/el.c
@@ -539,7 +539,7 @@ el_source(EditLine *el, const char *fnam
 #endif
        }
        if (fp == NULL)
-               fp = fopen(fname, "r");
+               fp = fopen(fname, "re");
        if (fp == NULL) {
                el_free(path);
                return -1;
Index: libedit-20110802-3.0/src/history.c
===================================================================
--- libedit-20110802-3.0.orig/src/history.c
+++ libedit-20110802-3.0/src/history.c
@@ -741,7 +741,7 @@ history_load(TYPE(History) *h, const cha
        static ct_buffer_t conv;
 #endif
 
-       if ((fp = fopen(fname, "r")) == NULL)
+       if ((fp = fopen(fname, "re")) == NULL)
                return i;
 
        if ((line = fgetln(fp, &sz)) == NULL)
@@ -802,7 +802,7 @@ history_save(TYPE(History) *h, const cha
        static ct_buffer_t conv;
 #endif
 
-       if ((fp = fopen(fname, "w")) == NULL)
+       if ((fp = fopen(fname, "we")) == NULL)
                return -1;
 
        if (fchmod(fileno(fp), S_IRUSR|S_IWUSR) == -1)
++++++ libedit-visibility.patch ++++++
Index: libedit-20110802-3.0/src/sys.h
===================================================================
--- libedit-20110802-3.0.orig/src/sys.h
+++ libedit-20110802-3.0/src/sys.h
@@ -63,7 +63,7 @@
 #endif
  
 #ifndef public
-# define public                /* Externally visible functions/variables */
+# define public                __attribute__ ((visibility ("default"))) /* 
Externally visible functions/variables */
 #endif
 
 #ifndef private
@@ -71,7 +71,7 @@
 #endif
 
 #ifndef protected
-# define protected     /* Redefined from elsewhere to "static" */
+# define protected      __attribute__ ((visibility ("hidden"))) /* Redefined 
from elsewhere to "static" */
                        /* When we want to hide everything      */
 #endif
 
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to