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
3688d7f3
Commit
3688d7f3
authored
Jul 01, 2010
by
antirez
Browse files
Compilation fixed on Linux after the source code split
parent
d3b958c3
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/aof.c
View file @
3688d7f3
...
@@ -3,6 +3,10 @@
...
@@ -3,6 +3,10 @@
#include <signal.h>
#include <signal.h>
#include <fcntl.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/wait.h>
/* Called when the user switches from "appendonly yes" to "appendonly no"
/* Called when the user switches from "appendonly yes" to "appendonly no"
* at runtime using the CONFIG command. */
* at runtime using the CONFIG command. */
...
...
src/debug.c
View file @
3688d7f3
#include "redis.h"
#include "redis.h"
#include "sha1.h"
/* SHA1 is used for DEBUG DIGEST */
#include "sha1.h"
/* SHA1 is used for DEBUG DIGEST */
#include <arpa/inet.h>
/* ================================= Debugging ============================== */
/* ================================= Debugging ============================== */
/* Compute the sha1 of string at 's' with 'len' bytes long.
/* Compute the sha1 of string at 's' with 'len' bytes long.
...
...
src/rdb.c
View file @
3688d7f3
...
@@ -2,6 +2,11 @@
...
@@ -2,6 +2,11 @@
#include "lzf.h"
/* LZF compression library */
#include "lzf.h"
/* LZF compression library */
#include <math.h>
#include <math.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/wait.h>
#include <arpa/inet.h>
int
rdbSaveType
(
FILE
*
fp
,
unsigned
char
type
)
{
int
rdbSaveType
(
FILE
*
fp
,
unsigned
char
type
)
{
if
(
fwrite
(
&
type
,
1
,
1
,
fp
)
==
0
)
return
-
1
;
if
(
fwrite
(
&
type
,
1
,
1
,
fp
)
==
0
)
return
-
1
;
...
...
src/redis.c
View file @
3688d7f3
...
@@ -41,7 +41,6 @@
...
@@ -41,7 +41,6 @@
#include <assert.h>
#include <assert.h>
#include <ctype.h>
#include <ctype.h>
#include <stdarg.h>
#include <stdarg.h>
#include <inttypes.h>
#include <arpa/inet.h>
#include <arpa/inet.h>
#include <sys/stat.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <fcntl.h>
...
@@ -1443,8 +1442,10 @@ void *getMcontextEip(ucontext_t *uc) {
...
@@ -1443,8 +1442,10 @@ void *getMcontextEip(ucontext_t *uc) {
#else
#else
return
(
void
*
)
uc
->
uc_mcontext
->
__ss
.
__eip
;
return
(
void
*
)
uc
->
uc_mcontext
->
__ss
.
__eip
;
#endif
#endif
#elif defined(__i386__) || defined(__X86_64__) || defined(__x86_64__)
#elif defined(__i386__)
return
(
void
*
)
uc
->
uc_mcontext
.
gregs
[
REG_EIP
];
/* Linux 32/64 bit */
return
(
void
*
)
uc
->
uc_mcontext
.
gregs
[
14
];
/* Linux 32 */
#elif defined(__X86_64__) || defined(__x86_64__)
return
(
void
*
)
uc
->
uc_mcontext
.
gregs
[
16
];
/* Linux 64 */
#elif defined(__ia64__)
/* Linux IA64 */
#elif defined(__ia64__)
/* Linux IA64 */
return
(
void
*
)
uc
->
uc_mcontext
.
sc_ip
;
return
(
void
*
)
uc
->
uc_mcontext
.
sc_ip
;
#else
#else
...
...
src/redis.h
View file @
3688d7f3
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
#include <limits.h>
#include <limits.h>
#include <unistd.h>
#include <unistd.h>
#include <errno.h>
#include <errno.h>
#include <inttypes.h>
#include "ae.h"
/* Event driven programming library */
#include "ae.h"
/* Event driven programming library */
#include "sds.h"
/* Dynamic safe strings */
#include "sds.h"
/* Dynamic safe strings */
...
...
src/ziplist.c
View file @
3688d7f3
...
@@ -551,7 +551,7 @@ void ziplistRepr(unsigned char *zl) {
...
@@ -551,7 +551,7 @@ void ziplistRepr(unsigned char *zl) {
if
(
entry
.
encoding
==
ZIP_ENC_RAW
)
{
if
(
entry
.
encoding
==
ZIP_ENC_RAW
)
{
fwrite
(
p
,
entry
.
len
,
1
,
stdout
);
fwrite
(
p
,
entry
.
len
,
1
,
stdout
);
}
else
{
}
else
{
printf
(
"%lld"
,
zipLoadInteger
(
p
,
entry
.
encoding
));
printf
(
"%lld"
,
(
long
long
)
zipLoadInteger
(
p
,
entry
.
encoding
));
}
}
printf
(
"
\n
"
);
printf
(
"
\n
"
);
p
+=
entry
.
len
;
p
+=
entry
.
len
;
...
...
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