mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 08:08:53 -05:00
Merged Solaris patches provided by Alan Harder
This commit is contained in:
parent
e3870fab57
commit
325d1eb4a8
12
Makefile
12
Makefile
@ -2,9 +2,15 @@
|
||||
# Copyright (C) 2009 Salvatore Sanfilippo <antirez at gmail dot com>
|
||||
# This file is released under the BSD license, see the COPYING file
|
||||
|
||||
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
|
||||
ifeq ($(uname_S),SunOS)
|
||||
CFLAGS?= -std=c99 -pedantic -O2 -Wall -W -D__EXTENSIONS__ -D_XPG6
|
||||
CCLINK?= -ldl -lnsl -lsocket
|
||||
else
|
||||
CFLAGS?= -std=c99 -pedantic -O2 -Wall -W
|
||||
endif
|
||||
CCOPT= $(CFLAGS) $(CCLINK) $(ARCH)
|
||||
DEBUG?= -g -rdynamic -ggdb
|
||||
CFLAGS?= -std=c99 -O2 -pedantic -Wall -W
|
||||
CCOPT= $(CFLAGS) $(ARCH)
|
||||
|
||||
OBJ = adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o
|
||||
BENCHOBJ = ae.o anet.o benchmark.o sds.o adlist.o zmalloc.o
|
||||
@ -45,7 +51,7 @@ redis-cli: $(CLIOBJ)
|
||||
$(CC) -o $(CLIPRGNAME) $(CCOPT) $(DEBUG) $(CLIOBJ)
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CCOPT) $(DEBUG) $(COMPILE_TIME) $<
|
||||
$(CC) -c $(CFLAGS) $(DEBUG) $(COMPILE_TIME) $<
|
||||
|
||||
clean:
|
||||
rm -rf $(PRGNAME) $(BENCHPRGNAME) $(CLIPRGNAME) *.o
|
||||
|
9
pqsort.c
9
pqsort.c
@ -37,15 +37,6 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)qsort.c 8.1 (Berkeley) 6/4/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: qsort.c,v 1.19 2009/01/30 23:38:44 lukem Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <assert.h>
|
||||
|
2
redis.c
2
redis.c
@ -2329,7 +2329,7 @@ static int rdbSave(char *filename) {
|
||||
/* Use RENAME to make sure the DB file is changed atomically only
|
||||
* if the generate DB file is ok. */
|
||||
if (rename(tmpfile,filename) == -1) {
|
||||
redisLog(REDIS_WARNING,"Error moving temp DB file on the final destionation: %s", strerror(errno));
|
||||
redisLog(REDIS_WARNING,"Error moving temp DB file on the final destination: %s", strerror(errno));
|
||||
unlink(tmpfile);
|
||||
return REDIS_ERR;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user