gobject-introspection r115 - in trunk: . tools
- From: robtaylor svn gnome org
- To: svn-commits-list gnome org
- Subject: gobject-introspection r115 - in trunk: . tools
- Date: Mon, 18 Feb 2008 16:25:30 +0000 (GMT)
Author: robtaylor
Date: Mon Feb 18 16:25:29 2008
New Revision: 115
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=115&view=rev
Log:
2008-02-18 Rob Taylor <rob taylor codethink co uk>
* tools/grealpath.h: Added:
* tools/scanner.c: (main):
* tools/scannerlexer.l:
* tools/Makefile.am:
Always use absolute paths with symbolic links resolved when
comparing filenames.
Added:
trunk/tools/grealpath.h
Modified:
trunk/ChangeLog
trunk/tools/Makefile.am
trunk/tools/scanner.c
trunk/tools/scannerlexer.l
Modified: trunk/tools/Makefile.am
==============================================================================
--- trunk/tools/Makefile.am (original)
+++ trunk/tools/Makefile.am Mon Feb 18 16:25:29 2008
@@ -34,7 +34,8 @@
scannerlexer.l \
scannerparser.y \
gidlwriter.c \
- gidlwriter.h
+ gidlwriter.h \
+ grealpath.h
g_idl_scanner_CFLAGS = $(GIREPO_CFLAGS) $(SCANNER_CFLAGS) -I$(top_srcdir)/girepository
g_idl_scanner_LDADD = $(GIREPO_LIBS) $(SCANNER_LIBS) $(top_builddir)/girepository/libgirepository.la libgirepository-parser.la
Added: trunk/tools/grealpath.h
==============================================================================
--- (empty file)
+++ trunk/tools/grealpath.h Mon Feb 18 16:25:29 2008
@@ -0,0 +1,20 @@
+#ifndef __G_REALPATH_H__
+#define __G_REALPATH_H__
+
+/**
+ * g_realpath:
+ *
+ * this should be a) filled in for win32 and b) put in glib...
+ */
+
+static inline gchar*
+g_realpath (const char *path)
+{
+ char buffer [PATH_MAX];
+ if (realpath(path, buffer))
+ return g_strdup(buffer);
+ else
+ return NULL;
+}
+
+#endif
Modified: trunk/tools/scanner.c
==============================================================================
--- trunk/tools/scanner.c (original)
+++ trunk/tools/scanner.c Mon Feb 18 16:25:29 2008
@@ -35,6 +35,8 @@
#include "gidlmodule.h"
#include "gidlnode.h"
#include "gidlwriter.h"
+#include "grealpath.h"
+
typedef GType (*TypeFunction) (void);
@@ -1674,7 +1676,8 @@
else
filename = g_strdup (argv[i]);
- filenames = g_list_append (filenames, filename);
+ filenames = g_list_append (filenames, g_realpath(filename));
+ g_free(filename);
}
else if (g_str_has_suffix (argv[i], ".la") ||
g_str_has_suffix (argv[i], ".so") ||
Modified: trunk/tools/scannerlexer.l
==============================================================================
--- trunk/tools/scannerlexer.l (original)
+++ trunk/tools/scannerlexer.l Mon Feb 18 16:25:29 2008
@@ -33,6 +33,7 @@
#include "scanner.h"
#include "scannerparser.h"
+#include "grealpath.h"
int lineno;
@@ -303,7 +304,8 @@
if (filename_builder->len > 0) {
char *filename = g_strcompress (filename_builder->str);
g_free (igenerator->current_filename);
- igenerator->current_filename = filename;
+ igenerator->current_filename = g_realpath(filename);
+ g_free(filename);
}
g_string_free (filename_builder, TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]