svn commit: samba r23363 - in branches: SAMBA_3_0/source/lib/replace SAMBA_3_0_26/source/lib/replace SAMBA_4_0/source/lib/replace

obnox at samba.org obnox at samba.org
Wed Jun 6 09:27:44 GMT 2007


Author: obnox
Date: 2007-06-06 09:27:43 +0000 (Wed, 06 Jun 2007)
New Revision: 23363

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23363

Log:
Activate rep_pread and rep_pwrite in lib/replace/replace.h.
This fixes the build on a SuSE 6.1. :-)
I guess this had been merely forgotten.

But beware: The implementations of rep_pread and rep_pwrite are
not thread safe.

Michael


Modified:
   branches/SAMBA_3_0/source/lib/replace/replace.c
   branches/SAMBA_3_0/source/lib/replace/replace.h
   branches/SAMBA_3_0_26/source/lib/replace/replace.c
   branches/SAMBA_3_0_26/source/lib/replace/replace.h
   branches/SAMBA_4_0/source/lib/replace/replace.c
   branches/SAMBA_4_0/source/lib/replace/replace.h


Changeset:
Modified: branches/SAMBA_3_0/source/lib/replace/replace.c
===================================================================
--- branches/SAMBA_3_0/source/lib/replace/replace.c	2007-06-06 07:46:38 UTC (rev 23362)
+++ branches/SAMBA_3_0/source/lib/replace/replace.c	2007-06-06 09:27:43 UTC (rev 23363)
@@ -438,6 +438,10 @@
 }
 #endif
 
+/*****************************************************************
+ Watch out: this is not thread safe.
+*****************************************************************/
+
 #ifndef HAVE_PREAD
 ssize_t rep_pread(int __fd, void *__buf, size_t __nbytes, off_t __offset)
 {
@@ -448,6 +452,10 @@
 }
 #endif
 
+/*****************************************************************
+ Watch out: this is not thread safe.
+*****************************************************************/
+
 #ifndef HAVE_PWRITE
 ssize_t rep_pwrite(int __fd, const void *__buf, size_t __nbytes, off_t __offset)
 {

Modified: branches/SAMBA_3_0/source/lib/replace/replace.h
===================================================================
--- branches/SAMBA_3_0/source/lib/replace/replace.h	2007-06-06 07:46:38 UTC (rev 23362)
+++ branches/SAMBA_3_0/source/lib/replace/replace.h	2007-06-06 09:27:43 UTC (rev 23363)
@@ -350,6 +350,16 @@
 char *rep_mkdtemp(char *template);
 #endif
 
+#ifndef HAVE_PREAD
+#define pread rep_pread
+ssize_t rep_pread(int __fd, void *__buf, size_t __nbytes, off_t __offset);
+#endif
+
+#ifndef HAVE_PWRITE
+#define pwrite rep_pwrite
+ssize_t rep_pwrite(int __fd, const void *__buf, size_t __nbytes, off_t __offset);
+#endif
+
 #ifdef HAVE_LIMITS_H
 #include <limits.h>
 #endif

Modified: branches/SAMBA_3_0_26/source/lib/replace/replace.c
===================================================================
--- branches/SAMBA_3_0_26/source/lib/replace/replace.c	2007-06-06 07:46:38 UTC (rev 23362)
+++ branches/SAMBA_3_0_26/source/lib/replace/replace.c	2007-06-06 09:27:43 UTC (rev 23363)
@@ -438,6 +438,10 @@
 }
 #endif
 
+/*****************************************************************
+ Watch out: this is not thread safe.
+*****************************************************************/
+
 #ifndef HAVE_PREAD
 ssize_t rep_pread(int __fd, void *__buf, size_t __nbytes, off_t __offset)
 {
@@ -448,6 +452,10 @@
 }
 #endif
 
+/*****************************************************************
+ Watch out: this is not thread safe.
+*****************************************************************/
+
 #ifndef HAVE_PWRITE
 ssize_t rep_pwrite(int __fd, const void *__buf, size_t __nbytes, off_t __offset)
 {

Modified: branches/SAMBA_3_0_26/source/lib/replace/replace.h
===================================================================
--- branches/SAMBA_3_0_26/source/lib/replace/replace.h	2007-06-06 07:46:38 UTC (rev 23362)
+++ branches/SAMBA_3_0_26/source/lib/replace/replace.h	2007-06-06 09:27:43 UTC (rev 23363)
@@ -350,6 +350,16 @@
 char *rep_mkdtemp(char *template);
 #endif
 
+#ifndef HAVE_PREAD
+#define pread rep_pread
+ssize_t rep_pread(int __fd, void *__buf, size_t __nbytes, off_t __offset);
+#endif
+
+#ifndef HAVE_PWRITE
+#define pwrite rep_pwrite
+ssize_t rep_pwrite(int __fd, const void *__buf, size_t __nbytes, off_t __offset);
+#endif
+
 #ifdef HAVE_LIMITS_H
 #include <limits.h>
 #endif

Modified: branches/SAMBA_4_0/source/lib/replace/replace.c
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/replace.c	2007-06-06 07:46:38 UTC (rev 23362)
+++ branches/SAMBA_4_0/source/lib/replace/replace.c	2007-06-06 09:27:43 UTC (rev 23363)
@@ -438,6 +438,10 @@
 }
 #endif
 
+/*****************************************************************
+ Watch out: this is not thread safe.
+*****************************************************************/
+
 #ifndef HAVE_PREAD
 ssize_t rep_pread(int __fd, void *__buf, size_t __nbytes, off_t __offset)
 {
@@ -448,6 +452,10 @@
 }
 #endif
 
+/*****************************************************************
+ Watch out: this is not thread safe.
+*****************************************************************/
+
 #ifndef HAVE_PWRITE
 ssize_t rep_pwrite(int __fd, const void *__buf, size_t __nbytes, off_t __offset)
 {

Modified: branches/SAMBA_4_0/source/lib/replace/replace.h
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/replace.h	2007-06-06 07:46:38 UTC (rev 23362)
+++ branches/SAMBA_4_0/source/lib/replace/replace.h	2007-06-06 09:27:43 UTC (rev 23363)
@@ -350,6 +350,16 @@
 char *rep_mkdtemp(char *template);
 #endif
 
+#ifndef HAVE_PREAD
+#define pread rep_pread
+ssize_t rep_pread(int __fd, void *__buf, size_t __nbytes, off_t __offset);
+#endif
+
+#ifndef HAVE_PWRITE
+#define pwrite rep_pwrite
+ssize_t rep_pwrite(int __fd, const void *__buf, size_t __nbytes, off_t __offset);
+#endif
+
 #ifdef HAVE_LIMITS_H
 #include <limits.h>
 #endif



More information about the samba-cvs mailing list