Problem with VMS_SUPPORT.C

John E. Malmberg wb8tyw at qsl.net
Fri Mar 28 15:13:57 GMT 2003


samba-vms-request at lists.samba.org wrote:
> 
> You are right that GETDVIW should be better than GETDVI, but this is clearly
> not the point. In addition, you CAN use a full file spec for $GETDVI, so
> it's not the point either. The addressing mode of the iosb is OK too.

Correct.  SYS$GETDVI/W ignores everything after the ":".

Putting an & sign on an array is a common bug that I have to remove from 
source code that I am fixing.  The compiler usually does the right 
thing.  An & sign is needed to pass a structure by address.

Recommended compile options are /STANDARD=PORTABLE/WARN=ENABLE=(LEVEL4, 
QUESTCODE).  The UNIX SAMBA version will compile using these settings 
with only a few informational diagnostics.

If the UNIX version does not compile, the UNIX maintainers usually will 
accept a gdiff formatted patch to repair their code.

Do not use /STANDARD=VAXC because that mode will hide programming errors.

> Well, it is very true that SOMEONE is doing unnecessary work, but it's not
> SAMBA.
> Samba is just a server, and does what the client asks it to do. If Samba
> retrieves the nb of free blocks, the only reason is that the client asked
> for it. Sure, the client has no understandable reason to do so, but it did.
> I think that in the Windows World, there is enough wonder in just observing
> what is done. Trying to understand WHY it's done is far too much for me.
> As an example, when you just right-click "Properties" on a file on the XP
> Explorer, it sends to Samba more than 10 consecutive requests to open that
> file, and one of those open requests is in WRITE mode !

I have not looked at Windows XP, but the ealier versions of SAMBA opened 
files READ/WRITE becuase it was too hard to change their fcntl() locking 
from READ locks to READ/WRITE if the client changed their mind.

These open/writes should not update the file modification dates.  The 
only way I see around this is to track to see if the file was actually 
modified and then use the XQP function to restore the dates to what they 
were when the file was opened.

The I/O wrapper routines in Frontport keep a context structure that 
could be modified to do this, as they need this structure to track fcntl 
locking.

See also the description for DECC$EFS_FILE_TIMESTAMPS in the 7.3-1 C RTL 
manual.

-John
wb8tyw at qsl.network
Personal Opinion Only



More information about the samba-vms mailing list