www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/18/08:08:29

Message-ID: <6R6NHShUccB@jocokko.edition.bonbit.org>
MIME-Version: 1.0
From: kay AT edition DOT bonbit DOT org (Kay Hayen)
Subject: Trying to compile 'recode' with djgpp
Date: 18 Feb 1997 00:00:00 +0000
Newsgroups: comp.os.msdos.djgpp
Distribution: world
Lines: 172
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hallo.

I've recently tried to compile 'recode' with no success. Recode is a  
program to convert between various charsets. It knows allmost any  
charset and is a really usefull toll, wenn you compile sources on  
different plattforms.

For example I used to have problems with

#ifdef __anything__

written under DOS but compiled with gcc under Linux, because the parser  
took the DOS extra newline thing as part of the symbol checked and never  
found it. I circumvented this with col <in >out before compiling, but  
now I have some german text with üöä which are encoded completely  
different on different plattforms.

I've found a makefile.os2 with recode which is said to be useable with  
emx, which I though could be near to djgpp. I didn't know what to do  
with a makefile.in under djgpp.

Here's what is said:

f:\recode-3.4.1>make -f Makefile.os2
make -f Makefile.os2 all CC="gcc -O -s" O=".obj" LDEFS="-a"
make.exe[1]: Entering directory `f:/recode-3.4.1'
gcc -O -s -c -I. -DHAVE_CONFIG_H=1 recode.c
In file included from recode.c:45:
g:/dos_gcc/include/setjmp.h:19: two or more data types in declaration of `jmp_bu
f'
recode.c:137: warning: `_stklen' initialized and declared `extern'
recode.c: In function `execute_popen_sequence':
recode.c:1746: warning: assignment makes pointer from integer without a cast
recode.c: In function `execute_sequence':
recode.c:2094: `O_BINARY' undeclared (first use this function)
recode.c:2094: (Each undeclared identifier is reported only once
recode.c:2094: for each function it appears in.)
recode.c:2103: `_fmode' undeclared (first use this function)
make.exe[1]: *** [recode.obj] Error 1
make.exe[1]: Leaving directory `f:/recode-3.4.1'
Deleting G:\dos_gcc\tmp\dj160000.err
     1 file deleted
make.exe: *** [release] Error 1

I *quite* irritated on the djgpp include that causes the "two or more  
data types..." error. Never seen this before and the file which is  
complained about is: (I didn't find anything special about it)

-------------- CUT -----------
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#ifndef __dj_include_setjmp_h_
#define __dj_include_setjmp_h_

#ifdef __cplusplus
extern "C" {
#endif

#ifndef __dj_ENFORCE_ANSI_FREESTANDING

typedef struct {
  unsigned long __eax, __ebx, __ecx, __edx, __esi;
  unsigned long __edi, __ebp, __esp, __eip, __eflags;
  unsigned short __cs, __ds, __es, __fs, __gs, __ss;
  unsigned long __sigmask; /* for POSIX signals only */
  unsigned long __signum; /* for expansion */
  unsigned long __exception_ptr; /* pointer to previous exception */
  unsigned char __fpu_state[108]; /* for future use */
} jmp_buf[1];

void    longjmp(jmp_buf env, int val);
int     setjmp(jmp_buf env);

#ifndef __STRICT_ANSI__

typedef jmp_buf sigjmp_buf;

int     sigsetjmp(sigjmp_buf env, int savemask);
int     siglongjmp(sigjmp_buf env, int val);

#ifndef _POSIX_SOURCE

#endif /* !_POSIX_SOURCE */
#endif /* !__STRICT_ANSI__ */
#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */

#ifndef __dj_ENFORCE_FUNCTION_CALLS
#endif /* !__dj_ENFORCE_FUNCTION_CALLS */

#ifdef __cplusplus
}
#endif

#endif /* !__dj_include_setjmp_h_ */

------------ CUT --------------------


The Makefile.OS2 is: (some lines are cut on the right edge, but this  
shouldn't be any harm)


# Makefile for recode, adapted for OS2.
# Copyright (C) 1991 Free Software Foundation, Inc.
# Francois Pinard <pinard AT iro DOT umontreal DOT ca>, 1988.

release:
        make -f Makefile.os2 all CC="gcc -O -s" O=".obj" LDEFS="-a"
debug:
        $(MAKE) -f Makefile.os2 all CC="gcc -g" O=".o"

DEFS = -DHAVE_CONFIG_H=1

CFLAGS = -I. $(DEFS)
LDFLAGS = $(LDEFS)
LIBS =

STEPOBJS = charset$O charset1$O charset2$O applemac$O atarist$O bangbang$O \
        cdcnos$O ebcdic$O flat$O ibmpc$O iconqnx$O lat1asci$O \
        lat1html$O lat1ltex$O lat1txte$O next$O merged$O

C_STEPS = charset1.c charset2.c applemac.c atarist.c bangbang.c cdcnos.c ebcdi
C_SPEPS2 = ibmpc.c iconqnx.c lat1asci.c lat1html.c lat1ltex.c lat1txte.c next.

L_STEPS = ascilat1.l ltexlat1.l txtelat1.l

LIBOBJS = xmalloc$O xstrdup$O getopt$O getopt1$O error$O argmatch$O

OBJECTS = recode$O charname$O $(STEPOBJS) $(LIBOBJS)

.SUFFIXES: . $O

.c$O:
        $(CC) -c $(CFLAGS) $<

all: recode.exe recode.info

recode.exe: $(OBJECTS)
        $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS)

recode.info: recode.texi
        makeinfo recode.texi

initstep.h: $(C_STEPS) $(C_STEPS2) merged.c
        sed -n "s/\(module_[^ ]*\).*/  \\1 ();/p" $(C_STEPS) merged.c >initste
        sed -n "s/\(module_[^ ]*\).*/  \\1 ();/p" $(C_STEPS2) merged.c >>inits


config.h: config_h.os2

------- CUT ---------

Any idea, why this fails ?

        Mls, Kay












-- =
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
>>Shareware nutzen ist gut, sie zu registrieren auch.
>Diese Nachricht besteht zu 100% aus recycelten Elektronen.
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>

- Raw text -


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