On 06 Sep 1999 20:22:17 +0200, Lars Gullik Bj°nnes wrote: >Duncan Simpson <[EMAIL PROTECTED]> writes: [initial subject being some problems of POSIX, UNIX, emx portability] > >| According to my man page strcasecmp is conforming to BSD 4.3 (and >| all unicies >| I have seen so far, inclduign SunOS). No surprise, SunOS is a BSD 4.3 clone written by one of the BSD 4.3 authors. But is it part of systems forking from ATT VII and USG? >| AFAIK GNU libc 2.1 is >| conforming to ANSI >| and POSIX but also includes common extensions, like mmap, lstat, setrlimit, >| snprintf, select, fileno, *BSD sockets and whole bunch of other >| stuff that is >| endemic in un*x source code and supported everywhere with very few >| exceptions. >| I can use fdopen in POSIX programs. There are also some things that >| only exist >| in glibc, and linux libc 5, like strfry(3) and memfrob(3), which are >| presumably included for hack value. >| >| The average punter, and Un*x programmer, is not aware of how little POSIX >| gives him. As soon as you prevent a remote root exploit by using >| snprintf you >| have violated POSIX > >And you don't know if you prog will compile on a system not running >gnu libs. > EMX in fact *has* most common Unix extensions (including strcasecmp). Only some of them (which are not explicitly 'legalized' by POSIX as we now know) use fn names coming from old M$ 16-bit C compiler. Will change when glibc and GNU libstdc++ become a POSIX standard, but first they have to become faster and lighter, I think. (Things are different for Linux kernel). >|---and of course by doing any networking and using >| select(2) you have violated POSIX anyway. All internationalisation is beyond >| the POSIX standard too. > >Not quite true, check man setlocale: >CONFORMING TO > ANSI C, POSIX.1 > >| BTW word2x has a source file that gives you strcasecmp and >| strncasecmp if you >| do not have them. LyX can steal it by GPL magic, which might GPL LyX on a >| technicality. I think LyX is already GPLed anyway :-) > >We do not want to use strcasecmp, and in LyX 1.1.x we are getting rid >of it. (using more native C++ constructs instead.) > >And yes, LyX is GPL, and has always been. (excetp for the very >beginning perhaps) FYI: [following being kinda footnote] M$ C 16-bit compiler was in the 'old days' back in the beginning of the '80s the first compiler available for M$ OS/2 v. 1.0 (BTW: OS/2 is still a TM of M$, therefore IBM uses nowadays it's own TM 'WARP' to avoid legal claims). EMX is an old extension and versions of this LIB C had to be compiled with M$ compiler, unfortunately using some of it's non-standard extensions. Even nowadays this is the thingy most PC software programmers have learned programming with and hence they became accustomed to the interface. Moreover E. Mattes (emx author) has the goal to preserve binary and source compatibility across versions, as well as his unrestricted (MIT-style) copyright for commercial use of the libraries, to help small firms supporting OS/2 (like commercial aladdin gs); for them for various reasons commercial compilers are a no op. All this means that emx programmers are sometimes reminded of the fact that 'POSIX does not buy you much...'. This is often a headache, but it also shows you which code is portable, aka standard conformant, and which code isn't, therefore has to add some quirks to gain portability. BTW: This is *not* very OS/2 specific! Greets, Arnd