error:'MSG_R' undeclared (first use in this function) under Solaris


 
Thread Tools Search this Thread
Top Forums Programming error:'MSG_R' undeclared (first use in this function) under Solaris
# 1  
Old 10-19-2010
Question error:'MSG_R' undeclared (first use in this function) under Solaris

I read book Unix Network Programming written by Richard,and it define following code under unpipc.c
#define SVMSG_MODE (MSG_R | MSG_W | MSG_R>>3 | MSG_R>>6)

when I compile code,it raise following error:
error:'MSG_R' undeclared (first use in this function)
error:'MSG_W' undeclared (first use in this function)

My OS is Solaris 10,which header file does MSG_R define? How to correct above code?

Thanks!
# 2  
Old 10-19-2010
I wouldn't trust that code even if you get it to compile, it assumes MSG_R is some particular value! You should not be shifting around constants like that.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Function throwing an error

Hi All I have two shell scripts where the second is getting invoked from the first. E.g. test1.sh and test2.sh Within test1, the code is something like this: #!/bin/bash . test2.sh usage() { echo "..." echo "....." } SRC=$1 DEST=$2 case "$3" in tran) doTran ;; *)... (7 Replies)
Discussion started by: swasid
7 Replies

2. UNIX for Advanced & Expert Users

error:- sh: error importing function definition for `module

Hi, We have installed linux6(RHEL) OS and installed datastage application on that. First time installation worked fine and our all services related to datastage was up and running. When we stopped the datastage and restarted its giving below error while restart:- ./uv -admin -start ... (0 Replies)
Discussion started by: prasson_ibm
0 Replies

3. UNIX for Dummies Questions & Answers

Getting a error while calling a function

Hi Friends, While calling a function in below scipt func_serv_logs () { find . -type f \( \( -name 'WLS*' -o -name 'access*' \) -a ! -name '*.gz' -a ! -newer ${REFERENCE} \) -print | while read FILENAME do echo "hi" done } func_serv_logs I am getting error... (4 Replies)
Discussion started by: Jcpratap
4 Replies

4. UNIX for Dummies Questions & Answers

Compilation Error--Undeclared Identifier

Hello, I am trying to install BBFTP software on my Mac (OS X), and am running into some compilation errors. Here is the code, the specific errors are listed after: #include <dirent.h> #include <errno.h> #include <fnmatch.h> #include <netinet/in.h> #include <syslog.h> #include <sys/stat.h>... (1 Reply)
Discussion started by: Tyler_92
1 Replies

5. UNIX for Dummies Questions & Answers

[ASK]execute shell with function in solaris

dear all i need your advice in shell with solaris i have testing script like this #!/usr/bin/bash function test(){ echo "testing only" } ## execute function ## test but if i running always got error like this test.sh: syntax error at line 1: `(' unexpected who can i running this... (7 Replies)
Discussion started by: zvtral
7 Replies

6. Shell Programming and Scripting

function: not found error on solaris

shell script in very simple, #!/bin/sh function msgs { echo 'this' } msgs It works on linux, apple, but can not run on solaris. On solaris, when I enter "./t.sh", it gave me following error, ./t.sh: function: not found this ./t.sh: msgs: not found What's wrong with... (3 Replies)
Discussion started by: microstarwwx
3 Replies

7. Programming

'SIGHUP','SIGTSTP' undeclared

I compile following statement signal(SIGHUP,sig_hup); kill(getpid(),SIGTSTP); $gcc test.c it raise following error: error:'SIGHUP' undeclared (first use in this function) error:'SIGTSTP' undeclared (first use in this function) Why raise above error? which head file include... (1 Reply)
Discussion started by: konvalo
1 Replies

8. AIX

Installation error - '_UKJBLEN' undeclared here

Hi, I want to install a ghostscript file in AIX 5.3.. i confgiured it then gave make command. it has thrown the following error. -O2 -Wall -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -Wno-strict-aliasing -fno-builtin -fno-common -DHAVE_STDINT_H... (0 Replies)
Discussion started by: meeraramanathan
0 Replies

9. Solaris

How to configure mail function on Solaris

Can some one please help to configure mails on Solaris. mail -s or mailx function don't work on the system. Commands do nothing. (2 Replies)
Discussion started by: raman1605
2 Replies

10. Shell Programming and Scripting

ORACLE return a function to Solaris

Guys, I´m have this problem and I do not know what to do anymore: cod=`sqlplus -s ${DATABASE} << EOF set heading off feedback off verify off select max(eventid) from events; exit EOF` sed "s/CODEVENTID/${cod}/" c.ctl Abova What I´ve done. The CODEEVENTID is already set into a... (1 Reply)
Discussion started by: Rafael.Buria
1 Replies
Login or Register to Ask a Question