www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/08/15/02:52:45

Date: Wed, 15 Aug 2001 09:51:06 +0300
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: Gerardo Cahn <glcahn AT usa DOT net>
Message-Id: <2110-Wed15Aug2001095106+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9
CC: djgpp AT delorie DOT com
In-reply-to: <h2sintcmkaff06f8dv5udeqls3rhi7join@4ax.com> (message from
Gerardo Cahn on Tue, 14 Aug 2001 14:40:24 -0400)
Subject: Re: regex.h problem
References: <h2sintcmkaff06f8dv5udeqls3rhi7join AT 4ax DOT com>
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

> From: Gerardo Cahn <glcahn AT usa DOT net>
> Newsgroups: comp.os.msdos.djgpp
> Date: Tue, 14 Aug 2001 14:40:24 -0400
> 
> A c++ program working under linux (gcc 2.96) gave me a syntax
> error under djgpp (2.95.3 20010315).
> 
> The problem seemed to be within the regex.h standard file; its
> line 17 read:
> 
> typedef off_t regoff_t;
> 
> This off_t was not defined.  I replaced it by 'int' and the
> program is running fine.
> 
> What was the correct way of having 'off_t' defined?

See the Info reference manual for the DJGPP library (from the DOS
prompt, type "info libc alpha regcomp").  See, it explicitly says to
use these two headers:

    #include <sys/types.h>
    #include <regex.h>

In other words, that program is buggy: it's not portable to any
platform except GNU/Linux.

- Raw text -


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