Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/eglib
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnome.org>2006-10-18 02:45:51 +0400
committerMiguel de Icaza <miguel@gnome.org>2006-10-18 02:45:51 +0400
commit23c73a090c3c2ae5d6826ef48d9ff31457f4f1da (patch)
tree19aedf02815dfa76a6aa2960b50a672f308eb2d0 /eglib
parenteb9ce0f683880e60ac9c9bb2984c93b0cb404aa0 (diff)
2006-10-17 Miguel de Icaza <miguel@novell.com>
* Add _GNU_SOURCE at configure time, remove from sources. * src/gstr.c (g_strsplit): Empty strings return a 0 value vector. * src/glib.h (G_MAXINT64, G_MININT64): Add another set of macros for the support stuff. Move private prototypes elsewhere svn path=/trunk/mono/; revision=66769
Diffstat (limited to 'eglib')
-rw-r--r--eglib/ChangeLog9
-rw-r--r--eglib/configure.ac2
-rw-r--r--eglib/src/garray.c1
-rw-r--r--eglib/src/gerror.c1
-rw-r--r--eglib/src/glib.h2
-rw-r--r--eglib/src/gmem.c1
-rw-r--r--eglib/src/goutput.c1
-rw-r--r--eglib/src/gpath.c1
-rw-r--r--eglib/src/gptrarray.c1
-rw-r--r--eglib/src/gshell.c1
-rw-r--r--eglib/src/gspawn.c1
-rw-r--r--eglib/src/gstr.c6
-rw-r--r--eglib/src/gstring.c1
-rw-r--r--eglib/test/string-util.c6
-rw-r--r--eglib/test/test.c1
15 files changed, 20 insertions, 15 deletions
diff --git a/eglib/ChangeLog b/eglib/ChangeLog
index 8f3cb48020b..dad588b4fde 100644
--- a/eglib/ChangeLog
+++ b/eglib/ChangeLog
@@ -1,7 +1,14 @@
2006-10-17 Miguel de Icaza <miguel@novell.com>
- * src/glib.h: Move private prototypes elsewhere
+ * Add _GNU_SOURCE at configure time, remove from sources.
+ * src/gstr.c (g_strsplit): Empty strings return a 0 value vector.
+
+ * src/glib.h (G_MAXINT64, G_MININT64): Add another set of macros
+ for the support stuff.
+
+ Move private prototypes elsewhere
+
* src/glib.h (g_thread_init): Adding missing brace
(g_list_next): remove ; from the macro definition.
diff --git a/eglib/configure.ac b/eglib/configure.ac
index d9e59f18b6b..97bda04e122 100644
--- a/eglib/configure.ac
+++ b/eglib/configure.ac
@@ -7,7 +7,7 @@ AM_MAINTAINER_MODE
AC_PROG_CC
AM_PROG_LIBTOOL
-CFLAGS='-g -O0'
+CFLAGS='-g -O0 -D_GNU_SOURCE'
AC_SUBST(CFLAGS)
GNUC_PRETTY=
GNUC_UNUSED=
diff --git a/eglib/src/garray.c b/eglib/src/garray.c
index 8844ee5db86..5e5f8a1ce3d 100644
--- a/eglib/src/garray.c
+++ b/eglib/src/garray.c
@@ -26,7 +26,6 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#define _GNU_SOURCE
#include <stdlib.h>
#include <glib.h>
diff --git a/eglib/src/gerror.c b/eglib/src/gerror.c
index 28892525fe5..99dab454995 100644
--- a/eglib/src/gerror.c
+++ b/eglib/src/gerror.c
@@ -25,7 +25,6 @@
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#define _GNU_SOURCE
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
diff --git a/eglib/src/glib.h b/eglib/src/glib.h
index e448f94c6e9..6bfbf84dcef 100644
--- a/eglib/src/glib.h
+++ b/eglib/src/glib.h
@@ -52,6 +52,8 @@ typedef uint16_t gunichar2;
#define G_MAXINT32 INT32_MAX
#define G_MININT32 INT32_MIN
+#define G_MININT64 INT64_MIN
+#define G_MAXINT64 INT64_MAX
#define G_LITTLE_ENDIAN 1234
#define G_BIG_ENDIAN 4321
diff --git a/eglib/src/gmem.c b/eglib/src/gmem.c
index 0d1a11307db..93c041ccb6d 100644
--- a/eglib/src/gmem.c
+++ b/eglib/src/gmem.c
@@ -25,7 +25,6 @@
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#define _GNU_SOURCE
#include <stdio.h>
#include <string.h>
#include <glib.h>
diff --git a/eglib/src/goutput.c b/eglib/src/goutput.c
index 346eab0d774..443a22c2663 100644
--- a/eglib/src/goutput.c
+++ b/eglib/src/goutput.c
@@ -24,7 +24,6 @@
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <glib.h>
diff --git a/eglib/src/gpath.c b/eglib/src/gpath.c
index e744da0c266..fa8c226dd3c 100644
--- a/eglib/src/gpath.c
+++ b/eglib/src/gpath.c
@@ -25,7 +25,6 @@
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#define _GNU_SOURCE
#include <stdio.h>
#include <glib.h>
#include <unistd.h>
diff --git a/eglib/src/gptrarray.c b/eglib/src/gptrarray.c
index a875982a655..193bd7240be 100644
--- a/eglib/src/gptrarray.c
+++ b/eglib/src/gptrarray.c
@@ -26,7 +26,6 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#define _GNU_SOURCE
#include <stdlib.h>
#include <glib.h>
diff --git a/eglib/src/gshell.c b/eglib/src/gshell.c
index b53dcad21ec..f7cbe404ce4 100644
--- a/eglib/src/gshell.c
+++ b/eglib/src/gshell.c
@@ -25,7 +25,6 @@
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#define _GNU_SOURCE
#include <stdio.h>
#include <glib.h>
diff --git a/eglib/src/gspawn.c b/eglib/src/gspawn.c
index d73e2864dea..43abd86ddc9 100644
--- a/eglib/src/gspawn.c
+++ b/eglib/src/gspawn.c
@@ -25,7 +25,6 @@
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
diff --git a/eglib/src/gstr.c b/eglib/src/gstr.c
index e17af172c99..3de12c17324 100644
--- a/eglib/src/gstr.c
+++ b/eglib/src/gstr.c
@@ -26,7 +26,6 @@
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#define _GNU_SOURCE
#include <stdio.h>
#include <string.h>
#include <ctype.h>
@@ -205,7 +204,10 @@ g_strsplit (const gchar *string, const gchar *delimiter, gint max_tokens)
}
}
- if(vector != NULL && size > 0) {
+ if (vector == NULL){
+ vector = (gchar **) g_malloc (2 * sizeof (vector));
+ vector [0] = NULL;
+ } else if (size > 0){
vector[size - 1] = NULL;
}
diff --git a/eglib/src/gstring.c b/eglib/src/gstring.c
index f5d899d2755..9b08c8c26ae 100644
--- a/eglib/src/gstring.c
+++ b/eglib/src/gstring.c
@@ -26,7 +26,6 @@
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#define _GNU_SOURCE
#include <stdio.h>
#include <glib.h>
diff --git a/eglib/test/string-util.c b/eglib/test/string-util.c
index a720832e074..aa39a9c9042 100644
--- a/eglib/test/string-util.c
+++ b/eglib/test/string-util.c
@@ -64,7 +64,11 @@ test_split ()
to_split, v[0]);
}
g_strfreev(v);
-
+
+ v = g_strsplit ("", ":", 0);
+ if (v == NULL)
+ return FAILED ("g_strsplit returned NULL");
+ g_strfreev (v);
return OK;
}
diff --git a/eglib/test/test.c b/eglib/test/test.c
index f3204325d8a..355d00b117a 100644
--- a/eglib/test/test.c
+++ b/eglib/test/test.c
@@ -26,7 +26,6 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#define _GNU_SOURCE
#include <stdlib.h>
#include <stdio.h>
#include <string.h>