Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
325d1eb4
Commit
325d1eb4
authored
Oct 26, 2009
by
antirez
Browse files
Merged Solaris patches provided by Alan Harder
parent
e3870fab
Changes
3
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
325d1eb4
...
@@ -2,9 +2,15 @@
...
@@ -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)
...
@@ -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
$(C
COPT
)
$(DEBUG)
$(COMPILE_TIME)
$<
$(CC)
-c
$(C
FLAGS
)
$(DEBUG)
$(COMPILE_TIME)
$<
clean
:
clean
:
rm
-rf
$(PRGNAME)
$(BENCHPRGNAME)
$(CLIPRGNAME)
*
.o
rm
-rf
$(PRGNAME)
$(BENCHPRGNAME)
$(CLIPRGNAME)
*
.o
...
...
pqsort.c
View file @
325d1eb4
...
@@ -37,15 +37,6 @@
...
@@ -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>
...
...
redis.c
View file @
325d1eb4
...
@@ -2329,7 +2329,7 @@ static int rdbSave(char *filename) {
...
@@ -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 desti
o
nation: %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
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment