Commit 784b3b49 by David Boyce

Fixed typo in example Makefile code and slimmed it down more.

Reverted signature of git_signature_new.
Removed error check wrappers (voted down). Made Makefile
work out of the box on Linux and Solaris when standard
cmake build instructions for the library are followed.
parent 0251733e
.PHONY: all .PHONY: all
CC = gcc
CFLAGS = -g -I../include CFLAGS = -g -I../include
LFLAGS = -Ldirectory-containing-libgit LFLAGS = -L../build -lgit2 -lz
all: general showindex all: general showindex
general : general.c % : %.c
gcc -o general $(CFLAGS) general.c $(LFLAGS) -lgit2 -lz $(CC) -o $@ $(CFLAGS) $< $(LFLAGS)
showindex : showindex.c
gcc -o showindex $(CFLAGS) showindex.c $(LFLAGS) -lgit2 -lz
clean: clean:
rm general showindex $(RM) general showindex
...@@ -48,7 +48,7 @@ GIT_BEGIN_DECL ...@@ -48,7 +48,7 @@ GIT_BEGIN_DECL
* @param offset timezone offset in minutes for the time * @param offset timezone offset in minutes for the time
* @return 0 on success; error code otherwise * @return 0 on success; error code otherwise
*/ */
GIT_EXTERN(int) git_signature_new(const git_signature **sig_out, const char *name, const char *email, git_time_t time, int offset); GIT_EXTERN(int) git_signature_new(git_signature **sig_out, const char *name, const char *email, git_time_t time, int offset);
/** /**
* Create a new action signature with a timestamp of 'now'. The * Create a new action signature with a timestamp of 'now'. The
......
...@@ -81,7 +81,7 @@ static int process_trimming(const char *input, char **storage, const char *input ...@@ -81,7 +81,7 @@ static int process_trimming(const char *input, char **storage, const char *input
return GIT_SUCCESS; return GIT_SUCCESS;
} }
int git_signature_new(const git_signature **sig_out, const char *name, const char *email, git_time_t time, int offset) int git_signature_new(git_signature **sig_out, const char *name, const char *email, git_time_t time, int offset)
{ {
int error; int error;
git_signature *p = NULL; git_signature *p = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment