mirror of
https://github.com/fluencelabs/redis
synced 2025-04-25 18:42:13 +00: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>
|
# Copyright (C) 2009 Salvatore Sanfilippo <antirez at gmail dot com>
|
||||||
# This file is released under the BSD license, see the COPYING file
|
# 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
|
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
|
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
|
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)
|
$(CC) -o $(CLIPRGNAME) $(CCOPT) $(DEBUG) $(CLIOBJ)
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c $(CCOPT) $(DEBUG) $(COMPILE_TIME) $<
|
$(CC) -c $(CFLAGS) $(DEBUG) $(COMPILE_TIME) $<
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(PRGNAME) $(BENCHPRGNAME) $(CLIPRGNAME) *.o
|
rm -rf $(PRGNAME) $(BENCHPRGNAME) $(CLIPRGNAME) *.o
|
||||||
|
9
pqsort.c
9
pqsort.c
@ -37,15 +37,6 @@
|
|||||||
* SUCH DAMAGE.
|
* 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 <sys/types.h>
|
||||||
|
|
||||||
#include <assert.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
|
/* Use RENAME to make sure the DB file is changed atomically only
|
||||||
* if the generate DB file is ok. */
|
* if the generate DB file is ok. */
|
||||||
if (rename(tmpfile,filename) == -1) {
|
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);
|
unlink(tmpfile);
|
||||||
return REDIS_ERR;
|
return REDIS_ERR;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user