Modify

Ticket #115 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

Initialisation not ANSI compliant

Reported by: nothingmuch@… Owned by: xi
Priority: normal Component: libyaml
Severity: normal Keywords:
Cc:

Description

Hi,

  1. Merijn Brand reported a bug against YAML::LibYAML involving a compliation error of scanner.c on HPUX:

 http://rt.cpan.org/Public/Bug/Display.html?id=42405

Supplied is a patch that hopefully resolves this issue.

Attachments

0001-ANSI-compliant-initialization-of-yaml_simple_key_t.patch Download (1.2 KB) - added by nothingmuch@… 5 years ago.
patch for HPUX compilation

Change History

Changed 5 years ago by nothingmuch@…

patch for HPUX compilation

comment:1 Changed 5 years ago by h.m.brand@…

Step 1. default build on HP-UX 10.20 with HP C-ANSI-C compiler

Checking if your kit is complete... Looks good Prototype mismatch: sub main::prompt: none vs ($;$) at /pro/lib/perl5/5.8.8/ExtUtils/MakeMaker.pm line 187 Writing Makefile for YAML::XS::LibYAML Writing Makefile for YAML::LibYAML cp lib/YAML/LibYAML.pm blib/lib/YAML/LibYAML.pm cp lib/YAML/XS.pm blib/lib/YAML/XS.pm make[1]: Entering directory `/pro/3gl/CPAN/YAML-LibYAML-0.32/LibYAML' cp lib/YAML/XS/LibYAML.pm ../blib/lib/YAML/XS/LibYAML.pm cc -c -I. -Ae +DAportable +Z -z -D_HPUX_SOURCE -Wl,+vnocompatwarnings -I/pro/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +O2 +Onolimit -DVERSION=\"\" -DXS_VERSION=\"\" +Z "-I/pro/lib/perl5/5.8.8/PA-RISC2.0/CORE" -DHAVE_CONFIG_H api.c cc: "api.c", line 1368: error 1521: Incorrect initialization. cc: "api.c", line 1368: error 1521: Incorrect initialization. make[1]: * [api.o] Error 1 make[1]: Leaving directory `/pro/3gl/CPAN/YAML-LibYAML-0.32/LibYAML' make: * [subdirs] Error 2

Step 2: Fix api.c:

yaml_node_pair_t pair;

pair.key = key; pair.value = value;

Step 3: make

cc -c -I. -Ae +DAportable +Z -z -D_HPUX_SOURCE -Wl,+vnocompatwarnings -I/pro/lo cal/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +O2 +Onolimit -DVERSION =\"\" -DXS_VERSION=\"\" +Z "-I/pro/lib/perl5/5.8.8/PA-RISC2.0/CORE" -DHAVE_CONF IG_H emitter.c cc: "emitter.c", line 1333: error 1521: Incorrect initialization. cc: "emitter.c", line 1333: error 1521: Incorrect initialization. cc: "emitter.c", line 1333: error 1521: Incorrect initialization. cc: "emitter.c", line 1335: error 1521: Incorrect initialization. cc: "emitter.c", line 1335: error 1521: Incorrect initialization. cc: "emitter.c", line 1335: error 1521: Incorrect initialization. cc: "emitter.c", line 1379: error 1521: Incorrect initialization. cc: "emitter.c", line 1379: error 1521: Incorrect initialization. cc: "emitter.c", line 1379: error 1521: Incorrect initialization. cc: "emitter.c", line 1411: error 1521: Incorrect initialization. cc: "emitter.c", line 1411: error 1521: Incorrect initialization. cc: "emitter.c", line 1411: error 1521: Incorrect initialization. cc: "emitter.c", line 1450: error 1521: Incorrect initialization. cc: "emitter.c", line 1450: error 1521: Incorrect initialization. cc: "emitter.c", line 1450: error 1521: Incorrect initialization. cc: "emitter.c", line 1796: error 1521: Incorrect initialization. cc: "emitter.c", line 1796: error 1521: Incorrect initialization. cc: "emitter.c", line 1796: error 1521: Incorrect initialization. cc: "emitter.c", line 1816: error 1521: Incorrect initialization. cc: "emitter.c", line 1816: error 1521: Incorrect initialization. cc: "emitter.c", line 1816: error 1521: Incorrect initialization. cc: "emitter.c", line 1832: error 1521: Incorrect initialization. cc: "emitter.c", line 1832: error 1521: Incorrect initialization. cc: "emitter.c", line 1832: error 1521: Incorrect initialization. cc: "emitter.c", line 1853: error 1521: Incorrect initialization. cc: "emitter.c", line 1853: error 1521: Incorrect initialization. cc: "emitter.c", line 1853: error 1521: Incorrect initialization. cc: "emitter.c", line 1899: error 1521: Incorrect initialization. cc: "emitter.c", line 1899: error 1521: Incorrect initialization. cc: "emitter.c", line 1899: error 1521: Incorrect initialization. cc: "emitter.c", line 1953: error 1521: Incorrect initialization. cc: "emitter.c", line 1953: error 1521: Incorrect initialization. cc: "emitter.c", line 1953: error 1521: Incorrect initialization. cc: "emitter.c", line 2014: error 1521: Incorrect initialization. cc: "emitter.c", line 2014: error 1521: Incorrect initialization. cc: "emitter.c", line 2014: error 1521: Incorrect initialization. cc: "emitter.c", line 2191: error 1521: Incorrect initialization. cc: "emitter.c", line 2191: error 1521: Incorrect initialization. cc: "emitter.c", line 2191: error 1521: Incorrect initialization. cc: "emitter.c", line 2227: error 1521: Incorrect initialization. cc: "emitter.c", line 2227: error 1521: Incorrect initialization. cc: "emitter.c", line 2227: error 1521: Incorrect initialization. make[1]: * [emitter.o] Error 1 make[1]: Leaving directory `/pro/3gl/CPAN/YAML-LibYAML-0.32/LibYAML'

I see no easy way out, other than to use a subroutine.

comment:2 Changed 5 years ago by xi

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in [346].

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.