[gnu.emacs.vms] VMSFNS does not compile under VAXC030

jym@APPLE.COM (07/19/89)

There should be an #includeable PRVDEF.H file in your SYS$LIBRARY directory.
 Do you know if that file is #included or if it's there?

If it's not there, let me know, and I'll tell you how to get one.
 <_Jym_>

ANK%CUNYVMS1.BITNET@MITVMA.MIT.EDU (ANIL KHULLAR) (07/19/89)

Today I tried to compile GNU Emacs 18.52 under VMS 5.0-2 using the
new VAX C 3.0 and found that VMSFNS did not compile. It seems all
references to PRV$V_ are not declared.

I would be obliged if someone in the net has any ideas what needs to
be changed.

Thanks in advance

        Anil

Below is the brief  error message
-----------------------------------------------------------
$ @emacs
Previous value of EMACS_LIBRARY has been superseded
$ set def [.src]
$ @compile
Compiling VMSFNS...
            { "ACNT",           PRV$V_ACNT },
"PRV$V_ACNT" is not declared within the scope of
                this usage.
                At line number 146 in DRA1:[EMACS.SRC]VMSFNS.C;1.

            { "ALLSPOOL",       PRV$V_ALLSPOOL },
"PRV$V_ALLSPOOL" is not declared within the scope of
                this usage.
                At line number 147 in DRA1:[EMACS.SRC]VMSFNS.C;1.

Completed with 41 error(s), 0 warning(s), and
                1 informational messages.
                At line number 897 in DRA1:[EMACS.SRC]VMSFNS.C;1.

$ logout
  Process PHOTO-0372 logged out at 18-JUL-1989 11:29:35.02

sasaki@shigeo.enet.dec.com (Marty Sasaki LTN1-1/D07 dtn:226-6011) (07/19/89)

The problem is that with VAXC v3 the way that 'V' constants were
declared has changed. Prior to v3 the V constants were integer
constants that were the number of bits to shift left a 1. From v3 on,
the V constants are a non-standard bit field declaration.
 
	bits = (1 << foo$v_bar);	/* prior to v3 */
	bits.foo$v_bar = 1;		/* v3 and later */
 
The solution that I chose was to create the old definitions and
include them into VMSFNS. The better solution would be to change the
code to use the new declarations.
 
I didn't post this in the past because I ran into this problem a long
time ago during the field test of VAXC v3 and didn't remember when v3
was released.
 
Anyway, place the code after the "cut here" line somewhere in
VMSFNS.c. Please note that the code is distributed with no warrantee,
etc. 
--
Marty Sasaki				sasaki@hydra.dec.com
Digital Equipment Corporation		508-486-6011
LTN1-1/D07
295 Foster Street
Littleton, MA 01460-1123
--------------------------------cut here--------------------------------
#define PRV$V_ACNT	0x09
#define PRV$V_ALLSPOOL  0x04
#define PRV$V_ALTPRI	0x0D
#define PRV$V_BUGCHK    0x17
#define PRV$V_BYPASS    0x1D
#define PRV$V_CMEXEC    0x01
#define PRV$V_CMKRNL    0x00
#define PRV$V_DETACH    0x05
#define PRV$V_DIAGNOSE  0x06
#define PRV$V_DOWNGRADE 0x21
#define PRV$V_EXQUOTA   0x13
#define PRV$V_GROUP     0x08
#define PRV$V_GRPNAM    0x03
#define PRV$V_GRPPRV 	0x22
#define PRV$V_LOG_IO    0x07
#define PRV$V_MOUNT     0x11
#define PRV$V_NETMBX    0x14
#define PRV$V_NOACNT    0x09
#define PRV$V_OPER      0x12
#define PRV$V_PFNMAP    0x1A
#define PRV$V_PHY_IO    0x16
#define PRV$V_PRMCEB    0x0A
#define PRV$V_PRMGBL    0x18
#define PRV$V_PRMJNL 	0x25
#define PRV$V_PRMMBX    0x0B
#define PRV$V_PSWAPM    0x0C
#define PRV$V_READALL 	0x23
#define PRV$V_SECURITY 	0x26
#define PRV$V_SETPRI    0x0D
#define PRV$V_SETPRV    0x0E
#define PRV$V_SHARE 	0x1F
#define PRV$V_SHMEM     0x1B
#define PRV$V_SYSGBL    0x19
#define PRV$V_SYSLCK	0x1E
#define PRV$V_SYSNAM    0x02
#define PRV$V_SYSPRV    0x1C
#define PRV$V_TMPJNL 	0x24
#define PRV$V_TMPMBX    0x0F
#define PRV$V_UPGRADE 	0x20
#define PRV$V_VOLPRO    0x15
#define PRV$V_WORLD     0x10

Bruce.Skinner@SAS1.DREA.DND.CA (07/20/89)

Anil Khullar writes --

===========================================================================
  > 
  > From: <ANK%CUNYVMS1.BITNET@mitvma.mit.edu> (ANIL KHULLAR)
  > Subject:  VMSFNS does not compile under VAXC030
  > To: vms-gnu-emacs@prep.ai.mit.edu
  > X-Original-To:  vms-gnu-emacs@prep.ai.mit.edu
  > 
  > Today I tried to compile GNU Emacs 18.52 under VMS 5.0-2 using the
  > new VAX C 3.0 and found that VMSFNS did not compile. It seems all
  > references to PRV$V_ are not declared.
  > 
  > I would be obliged if someone in the net has any ideas what needs to
  > be changed.
  > 
  > Thanks in advance
  > 
  >         Anil
  > 
===========================================================================

	I ran into this problem a couple of days ago.  Release 3 of
VAXC changed some of the .H files.  You will find the following on
page 9 of sys$help:vaxc030.release_notes

         A few of the above files changed to a  degree  that  programs
         that use those files may need to be modified:
                  .
                  .
                  .
          o  PRVDEF.H -- bit mask macros became bit field  members  of
             structs
                  .
                  .
                  .
         As the above list shows, the most common change was that  bit
         mask macros became bit field members of structs.  Previously,
         bit field members of data  structures  were  specified  using
         macros  that  defined  masks  for  accessing  the  bits.  The
         programmer was responsible for using the masks in conjunction
         with logical AND, OR, NOT, and shift operations to manipulate
         the target bits.  The header files have been changed  to  use
         bitfield  members  of  structs  to  accomplish the same task.
         This allows simple assignment statements to be used to set or
         clear bits.  For example:

             #include prvdef

             union prvdef privs;

             set()
             {
                 privs.prv$vcmkrnl = 1;
             }


	I'm not a C programmer, but I think you can probably get away with
using the old prvdef.H that you had with VAXC V2.4.  Any comments.

	By the way where is Mukesh Prasad?  He's the author and I'm
sure can answer this one.

regards++
Bruce S.

P.S.
	I think the VMS port of GNU Emacs is really well done.  My heartfelt
thanks to those who toiled ...

 +-----------------------------------------+--------------------------------+
 | Bruce S. Skinner                        | Bruce.Skinner@sas1.drea.dnd.ca |
 +-----------------------------------------+                                |
 | Defence Research Establishment Atlantic |     (902) 426-3100 (168)       |
 | Dartmouth, Nova Scotia, CANADA, B2Y 3Z7 |     (902) 228-2001 (home)      |
 +-----------------------------------------+--------------------------------+