| Title: | DECC |
| Notice: | General DEC C discussions |
| Moderator: | TLE::D_SMITH N TE |
| Created: | Fri Nov 13 1992 |
| Last Modified: | Fri Jun 06 1997 |
| Last Successful Update: | Fri Jun 06 1997 |
| Number of topics: | 2212 |
| Total number of notes: | 11045 |
Hello,
I have tried to compile a file from the UCX/eSNMP example MIB and I have
got many identical error messages.
I have used the following compiler command (OpenVMS 7.1/UCX 4.1):
$ CC chess-mib.c
... and thats the output from the compiler:
40
41 /*********************************************************************
42 |
43 | chess-mib.c Example Extensible SNMP Subagent
44 |
45 | This example sub-agent implements the wholly-fictitious
46 | chess MIB.
47 |
48 |
49 *********************************************************************/
50
51 #include <stdlib.h>
1543 #include <stdio.h>
2215 #include <errno.h>
2386 #include <string.h>
X 2787 #include <signal.h>
2788 #include <sys/types.h>
3133 #include <sys/time.h>
Source Listing 18-FEB-1997 15:04:16 DEC C V5.5-002 Page 2
24-JUL-1996 12:31:20 [SYSHLP.EXAMPLES.UCX.SNMP]CHESS_MIB.C;1
3710 #include <netinet/in.h>
4097
4098 #include "esnmp.h" /* esnmp definitions */
5137 int esnmp_init __((int *ssocket, char *subagent_identifier));
...................1
%CC-E-DECLARATION, (1) Invalid declaration.
5138 int esnmp_are_you_there __((void));
............................1
%CC-E-DECLARATION, (1) Invalid declaration.
5139 int esnmp_register __((SUBTREE *subtree, int timeout, int priority));
.......................1
%CC-E-DECLARATION, (1) Invalid declaration.
5140 int esnmp_unregister __((SUBTREE *subtree));
.........................1
%CC-E-DECLARATION, (1) Invalid declaration.
.
.
.
... and so on ...
Why is it an invalid declaration. On Digital UNIX does it compile without
any problems.
Could somebody help me ?
regards,
Dieter Lukas
| T.R | Title | User | Personal Name | Date | Lines |
|---|---|---|---|---|---|
| 2094.1 | WIBBIN::NOYCE | Pulling weeds, pickin' stones | Tue Feb 18 1997 09:41 | 3 | |
You need to find out who is supposed to declare the "__" macro, and why it's not working properly -- perhaps it's incorrectly conditionalized for DEC C / VMS. | |||||
| 2094.2 | "proto" macro in /usr/include/standards.h | DECC::SULLIVAN | Jeff Sullivan | Tue Feb 18 1997 11:39 | 20 |
On Digital UNIX, the macro expands to a full prototype or a K&R style prototype depending on the compiler mode. Here's how it's defined: #if !defined(__STDC__) && !defined(__cplusplus) #ifndef _NO_PROTO #define _NO_PROTO #endif #ifdef _NO_PROTO #define __(__args__) () #else /* _NO_PROTO */ #define __(__args__) __args__ #endif /* _NO_PROTO */ You would get this implicitly by including many of the standard headers (stdio, stdlib, etc...). Not sure why it's not defined, in your case, on VMS. -Jeff | |||||
| 2094.3 | /STANDARD=VAXC is the solution | FRUST::LUKAS | Unix starts with an `L' | Fri Mar 07 1997 03:30 | 11 |
Hello,
I found out that I have to use the /STANDARD=VAXC switch to eliminate these
warning messages.
regards,
Dieter
| |||||