www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/10/16/04:29:53

Message-ID: <20011016082308.12881.qmail@web9105.mail.yahoo.com>
Date: Tue, 16 Oct 2001 01:23:08 -0700 (PDT)
From: ROLAND <roland_asmann AT yahoo DOT com>
Subject: Re: Another cross-compiler problem!
To: djgpp AT delorie DOT com
In-Reply-To: <9q6t6i$o91$1@nets3.rz.RWTH-Aachen.DE>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> To avoid that, you should supply an action for this
> rule, so Bison
> doesn't have to insert a "default action" for you:
> 
>   iunit:	label {}
> 
I'm afraid it doesn't work for me.
I also left out a part of the BSION-code.
This is the correct code:

iunit : label
      | instr
      | NOP
            {instrcounter++;
            }
      ;

label : /* empty */
            { $$[0] = '\0';
            }
      | LABEL
            { storeinstrlabel($1,LDEF);
              strcopy($$, $1);
            }
      ;

All names in CAPS are declared as Terminals.
Maybe you can give me some more advice?

And furthermore, I now have trouble with the commands
access and stat.
On my sparc everything runs fine, but on my PC these
commands return -1, and then my program exits.
What can I do about this?
Here is the code where things go wrong:

if (access(cnffilename, R_OK) != 0 ||
        stat(cnffilename, &pathstatus) != 0 ||
        (pathstatus.st_mode & S_IFMT) != S_IFREG) {
    if (ERRNO != 0)
        errorstatus= ERRNO;
    else
        errorstatus= EISDIR;
    commer_handler(5, cnffilename);
}

Everything compiles correct, but when I run the
program, it terminates on a fault caused by both the
access and the stat command.


__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019