<div dir="ltr"><span style="font-family:monospace">Hi,</span><div class="gmail_quote"><div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">I am trying to enable rsync on the z/OS operating system. <br></span></div><div><span style="font-family:monospace">One problem is that in rsync.h, the 'mode' field of 'struct file_struct' is uint16, but on z/OS, mode_t is 32 bits, not 16, and so information gets lost.</span></div><div><span style="font-family:monospace">A bigger problem is that the bits behind the definition of S_ISREG on z/OS:</span></div><div><span style="font-family:monospace"> <br></span></div><div><span style="font-family:monospace">#define S_ISREG(m)  ( ( (m) & S_IFMT)==S_IFREG )</span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">reference S_IFMT. Those bits are not defined in the same way as on Linux. z/OS has:</span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">#define S_IFMT  0xFF000000</span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">whereas I believe Linux systems use:<br><br></span><pre><code><span>#<span>define</span> S_IFMT      0170000 <br><br></span></code></pre><pre><code><span>(note Linux is Octal and z/OS is Hexadecimal)<br></span></code></pre></div><div>The other 'type' macros have similar issues where the top half-word is used on z/OS whereas different bits are used on Linux.</div><div><br></div><div>I am not sure, but I _think_ that the full mode with type information is expected to be sent from sender to receiver and, I'm expecting that if it is different, the code will not work.</div><div>Is this correct, or will rsync 'map' OS specific mode bits to a common 'mode' over the network?</div><div><br></div><div>Any suggestions on the best way to 'fix' this? Do other platforms have this type of issue?</div><div><br></div><div>Thanks, Mike Fulton<br></div></div>
</div></div>
</div></div>