From: Thomas Glanzmann <sithglan@stud.uni-erlangen.de>
To: git@vger.kernel.org
Cc: Thomas Glanzmann <sithglan@stud.uni-erlangen.de>
Subject: [PATCH] Make git compile with SUNs forte12 compiler
Date: Sat, 12 May 2007 23:35:10 +0200 [thread overview]
Message-ID: <11790057101792-git-send-email-sithglan@stud.uni-erlangen.de> (raw)
This patch moves two inline functions from a header file to the corresponding c
file. Otherwise forte12 refuses to compile git with the following error:
LINK git-convert-objects
ld: fatal: symbol `tree_entry_extract' is multiply-defined:
(file libgit.a(sha1_name.o) type=FUNC; file libgit.a(tree.o) type=FUNC);
ld: fatal: symbol `tree_entry_extract' is multiply-defined:
(file libgit.a(sha1_name.o) type=FUNC; file libgit.a(tree-walk.o) type=FUNC);
ld: fatal: File processing errors. No output written to git-convert-objects
gmake[1]: *** [git-convert-objects] Error 1
Signed-off-by: Thomas Glanzmann <sithglan@stud.uni-erlangen.de>
---
tree-walk.c | 14 ++++++++++++++
tree-walk.h | 13 +------------
2 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/tree-walk.c b/tree-walk.c
index cbb24eb..ef57951 100644
--- a/tree-walk.c
+++ b/tree-walk.c
@@ -2,6 +2,20 @@
#include "tree-walk.h"
#include "tree.h"
+inline int tree_entry_len(const char *name, const unsigned char *sha1)
+{
+ return (char *)sha1 - (char *)name - 1;
+}
+
+inline const unsigned char *tree_entry_extract(struct tree_desc *desc,
+ const char **pathp, unsigned int *modep)
+{
+ *pathp = desc->entry.path;
+ *modep = canon_mode(desc->entry.mode);
+ return desc->entry.sha1;
+}
+
+
static const char *get_mode(const char *str, unsigned int *modep)
{
unsigned char c;
diff --git a/tree-walk.h b/tree-walk.h
index 43458cf..984f19e 100644
--- a/tree-walk.h
+++ b/tree-walk.h
@@ -13,21 +13,10 @@ struct tree_desc {
unsigned int size;
};
-static inline const unsigned char *tree_entry_extract(struct tree_desc *desc, const char **pathp, unsigned int *modep)
-{
- *pathp = desc->entry.path;
- *modep = canon_mode(desc->entry.mode);
- return desc->entry.sha1;
-}
-
-static inline int tree_entry_len(const char *name, const unsigned char *sha1)
-{
- return (char *)sha1 - (char *)name - 1;
-}
-
void update_tree_entry(struct tree_desc *);
void init_tree_desc(struct tree_desc *desc, const void *buf, unsigned long size);
const unsigned char *tree_entry_extract(struct tree_desc *, const char **, unsigned int *);
+int tree_entry_len(const char *name, const unsigned char *sha1);
/* Helper function that does both of the above and returns true for success */
int tree_entry(struct tree_desc *, struct name_entry *);
--
1.5.1.3
next reply other threads:[~2007-05-12 21:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-12 21:35 Thomas Glanzmann [this message]
2007-05-13 9:47 ` [PATCH] Make git compile with SUNs forte12 compiler Matthieu CASTET
2007-05-13 10:30 ` Thomas Glanzmann
2007-05-13 12:52 ` matthieu castet
2007-05-13 10:39 ` Johannes Schindelin
2007-05-13 10:52 ` Thomas Glanzmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11790057101792-git-send-email-sithglan@stud.uni-erlangen.de \
--to=sithglan@stud.uni-erlangen.de \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).