Change name of the buffersize so that they can't conflict.

This commit is contained in:
Andreas Schneider 2008-06-02 16:05:40 +02:00
parent e2b049c935
commit 5168e3ee70
3 changed files with 7 additions and 5 deletions

View file

@ -56,7 +56,9 @@
/**
* Maximum size of a buffer for transfer
*/
#define MAX_XFER_BUF_SIZE 16348
#ifndef MAX_XFER_BUF_SIZE
#define MAX_XFER_BUF_SIZE (16 * 1024)
#endif
#define CSYNC_STATUS_INIT 1 << 0
#define CSYNC_STATUS_UPDATE 1 << 1

View file

@ -51,7 +51,7 @@ int c_copy(const char* src, const char *dst, mode_t mode) {
int rc = -1;
ssize_t bread, bwritten;
struct stat sb;
char buf[MAX_XFER_BUF_SIZE];
char buf[BUFFER_SIZE];
if (c_streq(src, dst)) {
return -1;
@ -88,7 +88,7 @@ int c_copy(const char* src, const char *dst, mode_t mode) {
}
for (;;) {
bread = read(srcfd, buf, MAX_XFER_BUF_SIZE);
bread = read(srcfd, buf, BUFFER_SIZE);
if (bread == 0) {
/* done */
break;

View file

@ -36,8 +36,8 @@
#include <sys/types.h>
#ifndef MAX_XFER_BUF_SIZE
#define MAX_XFER_BUF_SIZE 16348
#ifndef BUFFER_SIZE
#define BUFFER_SIZE (16 * 1024)
#endif
/**