04 August 2017

regexp

System: Microsoft Windows 10 Home Edition
CPUs: Intel(R) Celeron(R) CPU N3060 @1.60GHz
64-bit Operating System, x64-based processor
Deps: vs_community__1560150700.1495339730.exe

This post will look at compiling R. Cox's libregexp9, a port
of Plan 9's Unicode-capable regular expression library.

https://www.visualstudio.com/downloads/
vs_community__1560150700.1495339730.exe

See the 9pvfs post for the Visual Studio setup

https://swtch.com/plan9port/unix/
mk-with-libs.tgz

Replace memccpy with _memccpy, write with _write, and unistd.h with io.h, in the libfmt,
libregexp and libutf, subdirectories. You can also add _CRT_SECURE_NO_WARNINGS
to your preprocessor definitions so as to suppress certain warnings.

The files from libfmt as test.c, test2.c and test3.c, and from libregexp as test.c and test2.c
were removed before attempting the compile. I can't say at this point of time whether their
removal was the cause of any of the below warnings being output. The mk executable uses
sys/wait.h which likewise to unistd.h is unavailable on visual studio. I can't say at this point
of time if a substitute for the required (for mk) sys/wait.h functions would be able to be found
among the visual studio provided header files.

See also https://github.com/nurmi-labs/9pm

TODO: read 9pm's u.h

1>------ Build started: Project: libutf, Configuration: Release Win32 ------
1>rune.c
1>rune.c(132): warning C4244: '=': conversion from 'long' to 'char', possible loss of data
1>rune.c(141): warning C4244: '=': conversion from 'long' to 'char', possible loss of data
1>rune.c(153): warning C4244: '=': conversion from 'long' to 'char', possible loss of data
1>rune.c(163): warning C4244: '=': conversion from 'long' to 'char', possible loss of data
1>runestrcat.c
1>runestrchr.c
1>runestrcmp.c
1>runestrcpy.c
1>runestrdup.c
1>runestrecpy.c
1>runestrlen.c
1>runestrncat.c
1>runestrncmp.c
1>runestrncpy.c
1>runestrrchr.c
1>runestrstr.c
1>runetype.c
1>utfecpy.c
1>utflen.c
1>utfnlen.c
1>utfrrune.c
1>utfrune.c
1>utfutf.c
1>Generating Code...
1>libutf.vcxproj -> C:\mk\libutf\Release\libutf.lib
1>Done building project "libutf.vcxproj".
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

1>------ Build started: Project: libfmt, Configuration: Release Win32 ------
1>charstod.c
1>dofmt.c
1>dorfmt.c
1>errfmt.c
1>fltfmt.c
1>fmt.c
1>fmtfd.c
1>fmtfdflush.c
1>fmtlocale.c
1>fmtlock.c
1>fmtnull.c
1>fmtprint.c
1>fmtquote.c
1>fmtrune.c
1>fmtstr.c
1>fmtvprint.c
1>fprint.c
1>nan64.c
1>pow10.c
1>print.c
1>Generating Code...
1>Compiling...
1>runefmtstr.c
1>runeseprint.c
1>runesmprint.c
1>runesnprint.c
1>runesprint.c
1>runevseprint.c
1>runevsmprint.c
1>runevsnprint.c
1>seprint.c
1>smprint.c
1>snprint.c
1>sprint.c
1>sprint.c(24): warning C4146: unary minus operator applied to unsigned type, result still unsigned
1>strtod.c
1>vfprint.c
1>vseprint.c
1>vsmprint.c
1>vsnprint.c
1>Generating Code...
1>libfmt.vcxproj -> C:\mk\libfmt\Release\libfmt.lib
1>Done building project "libfmt.vcxproj".
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

1>------ Build started: Project: libregexp, Configuration: Release Win32 ------
1>regaux.c
1>regcomp.c
1>regerror.c
1>regexec.c
1>regsub.c
1>rregexec.c
1>rregsub.c
1>Generating Code...
1>libregexp.vcxproj -> C:\mk\libregexp\Release\libregexp.lib
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

Endeavouring to compile libbio produced the following warnings.

1>------ Build started: Project: libbio, Configuration: Release Win32 ------
1>bbuffered.c
1>bcat.c
1>bcat.c(28): warning C4013: 'Bfmtinit' undefined; assuming extern returning int
1>bcat.c(30): warning C4013: 'Bfmtflush' undefined; assuming extern returning int
1>bcat.c(45): warning C4013: 'exit' undefined; assuming extern returning int
1>bfildes.c
1>bflush.c
1>bgetc.c
1>bgetd.c
1>bgetrune.c
1>binit.c
1>boffset.c
1>bprint.c
1>bputc.c
1>bputrune.c
1>brdline.c
1>brdstr.c
1>bread.c
1>bseek.c
1>bseek.c(34): warning C4244: '+=': conversion from 'vlong' to 'int', possible loss of data
1>bseek.c(48): warning C4244: 'function': conversion from 'vlong' to 'long', possible loss of data
1>bseek.c(55): warning C4244: 'function': conversion from '__int64' to 'long', possible loss of data
1>bvprint.c
1>bwrite.c
1>Generating Code...
1>libbio.vcxproj -> C:\mk\libbio\Release\libbio.lib
1>Done building project "libbio.vcxproj".
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

NB: A test compile of an extracted mk-with-libs.tgz on
a GNU/Linux machine doesn't output these warnings.

No comments:

Post a Comment