From owner-freebsd-questions@freebsd.org Tue Dec 4 19:23:26 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2379B1318BD2 for ; Tue, 4 Dec 2018 19:23:26 +0000 (UTC) (envelope-from karly@kipshouse.net) Received: from mgmt.ironboy.kipshouse.net (ironboy.kipshouse.net [IPv6:2001:470:835a:4242::42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx.kipshouse.net", Issuer "Starfield Secure Certificate Authority - G2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 04E526DF57 for ; Tue, 4 Dec 2018 19:23:24 +0000 (UTC) (envelope-from karly@kipshouse.net) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=kipshouse.org; i=@kipshouse.org; q=dns/txt; s=kh-ss; t=1543951405; x=1575487405; h=resent-from:resent-date:resent-message-id:resent-to:date: from:to:cc:subject:message-id:references:mime-version: in-reply-to; z=Resent-From:=20Karl=20Young=20 |Resent-Date:=20Tue,=204=20Dec=202018=2011:23:22=20-0800 |Resent-Message-ID:=20<20181204192322.GA25082@mailboy.kip shouse.net>|Resent-To:=20freebsd-questions@freebsd.org |Date:=20Mon,=204=20Dec=202018=2011:22:13=20-0800|From: =20Karl=20Young=20|To:=20byrnejb@h arte-lyne.ca|Cc:=20freebsd-questions@freebsd.org|Subject: =20Re:=20clang=20FreeBSD=20question|Message-ID:=20<201812 03235313.GU21286@mailboy.kipshouse.net>|References:=20<4c 729c3af0c550644f1e3b32cbd7f2f9.squirrel@webmail.harte-lyn e.ca>|MIME-Version:=201.0|In-Reply-To:=20<4c729c3af0c5506 44f1e3b32cbd7f2f9.squirrel@webmail.harte-lyne.ca>; bh=vBWEFz5oFfw7y1BKaDpXL8juYXsHWTJ37cJJ7FqmcEE=; b=kwpmURM4TU8A36q4JTr+9opJAoDREFl439O9snevhtNxEcac0Ffrjg/w IyHl8I5eeyVn2vCJMku7iCisd6p+peqzsGrcfpOLBV/rp7UhgE/LHE+I2 FvxaE1ZKYZQKmQuKuT1+gUWX993EH/OkL0WtYNeNkdixcf5kdQe1L9BBw hxQjVNtCf1ICJ5+IXC7IsDrPkUaVL7cm/GLGHVMMRtjX1hNdAlfGM6oDL n09SMyvy1ys/MJoUp4/UVayGQC1fAq6QDru+O2C6Id34bWmOVNhbnOWbQ aRrtcWABDGHwN4o6A3RPXIJiGNvSB2bBv2NhTVh773fxXCWArou493Rpl A==; Authentication-Results: d2.ironport.kipshouse.net; dkim=none (message not signed) header.i=none; spf=None smtp.pra=karly@kipshouse.org; spf=None smtp.mailfrom=karly@kipshouse.net; spf=None smtp.helo=postmaster@mailboy.kipshouse.net Received-SPF: None (d2.ironport.kipshouse.net: no sender authenticity information available from domain of karly@kipshouse.org) identity=pra; client-ip=2001:470:835a:1010::26; receiver=d2.ironport.kipshouse.net; envelope-from="karly@kipshouse.net"; x-sender="karly@kipshouse.org"; x-conformance=sidf_compatible Received-SPF: None (d2.ironport.kipshouse.net: no sender authenticity information available from domain of karly@kipshouse.net) identity=mailfrom; client-ip=2001:470:835a:1010::26; receiver=d2.ironport.kipshouse.net; envelope-from="karly@kipshouse.net"; x-sender="karly@kipshouse.net"; x-conformance=sidf_compatible Received-SPF: None (d2.ironport.kipshouse.net: no sender authenticity information available from domain of postmaster@mailboy.kipshouse.net) identity=helo; client-ip=2001:470:835a:1010::26; receiver=d2.ironport.kipshouse.net; envelope-from="karly@kipshouse.net"; x-sender="postmaster@mailboy.kipshouse.net"; x-conformance=sidf_compatible X-SBRS: None X-MID: 317502 X-RemoteIP: 2001:470:835a:1010::26 X-RemoteHost: 2001:470:835a:1010::26, mailboypriv.kipshouse.net X-IronPort-AV: E=McAfee;i="5900,7806,9097"; a="317502" Received: from mailboypriv.kipshouse.net (HELO mailboy.kipshouse.net) ([IPv6:2001:470:835a:1010::26]) by d2.ironport.kipshouse.net with ESMTP; 04 Dec 2018 11:23:23 -0800 Received: by mailboy.kipshouse.net (Postfix, from userid 500) id CC735465A7; Tue, 4 Dec 2018 11:23:22 -0800 (PST) Resent-From: Karl Young Resent-Date: Tue, 4 Dec 2018 11:23:22 -0800 Resent-Message-ID: <20181204192322.GA25082@mailboy.kipshouse.net> Resent-To: freebsd-questions@freebsd.org Date: Mon, 4 Dec 2018 11:22:13 -0800 From: Karl Young To: byrnejb@harte-lyne.ca Cc: freebsd-questions@freebsd.org Subject: Re: clang FreeBSD question Message-ID: <20181203235313.GU21286@mailboy.kipshouse.net> References: <4c729c3af0c550644f1e3b32cbd7f2f9.squirrel@webmail.harte-lyne.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4c729c3af0c550644f1e3b32cbd7f2f9.squirrel@webmail.harte-lyne.ca> X-Arbitrary-Number-Of-The-Day: 42 X-URL: http://www.kipshouse.org/karly X-Work-URL: http://www.cisco.com/ X-Disclaimer: My opinions do not necessarily represent those of my employer. User-Agent: Mutt/1.7.2 (2016-11-26) X-Rspamd-Queue-Id: 04E526DF57 X-Spamd-Result: default: False [-3.30 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[kipshouse.org]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; HFILTER_HELO_IP_A(1.00)[mgmt.ironboy.kipshouse.net]; HFILTER_HELO_NORES_A_OR_MX(0.30)[mgmt.ironboy.kipshouse.net]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: mx.kipshouse.net]; RCPT_COUNT_TWO(0.00)[2]; DMARC_NA(0.00)[kipshouse.org]; DKIM_TRACE(0.00)[kipshouse.org:+]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[freebsd@kipshouse.org,karly@kipshouse.net]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-1.61)[ipnet: 2001:470::/32(-4.48), asn: 6939(-3.46), country: US(-0.09)]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[freebsd@kipshouse.org,karly@kipshouse.net] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Dec 2018 19:23:26 -0000 This mail never made it to the list. I see I sent it from a different address than I subscribed with. Trying again. FreeBSD should be Posix-compliant. It looks like the _POSIX_SRC macro is obsolete, but you might try defining it. https://www.freebsd.org/cgi/man.cgi?query=feature_test_macros&manpath=SuSE+Linux/i386+11.3 James B. Byrne via freebsd-questions(freebsd-questions@freebsd.org)@2018.12.03 17:10:19 -0500: > I am hacking an old terminal emulator program originally written for > something other than FreeBSD. Ihave encountered this error: > > cc -I../ -I../BSDI -I/usr/include -I/usr/local/include > -DSHOW_DC1_COUNT=0 -DDEBUG_BREAK=0 -DIGNORE_KEYBOARD_LOCK=1 > -DIGNORE_USER_SYSTEM_LOCK=1 -DDEBUG_BLOCK_MODE=0 -DMEMLOCK_2000 -c > tty.c > tty.c:179:28: error: use of undeclared identifier 'CBAUD' > curr_termio.c_cflag &= ~(CBAUD); > > > The code in question looks like this: > > #ifdef _POSIX_SOURCE > if (cfsetispeed((PTERMIO)&curr_termio, speed) == -1) > { > printf ("Error %d from cfsetispeed(%s)\n", errno, deviceinfo); > show_tty_error ("cfsetispeed()", errno); > return(-1); > } > if (cfsetospeed((PTERMIO)&curr_termio, speed) == -1) > { > printf ("Error %d from cfsetospeed(%s)\n", errno, deviceinfo); > show_tty_error ("cfsetospeed()", errno); > return(-1); > } > #else > curr_termio.c_cflag &= ~(CBAUD); > curr_termio.c_cflag |= speed; > > I can guess that FreeBSD is not a POSIX compliant OS, or at least does > not declar itself so in the manner the programmer expected. However, > the only other references to CBAUD that I can find on this system is: > > /usr/local/include/gphoto2/gphoto2-port-portability.h:99:# define > CBAUD 0x0000100f > /usr/local/include/gphoto2/gphoto2-port-portability.h:129:# define > CBAUDEX 0x00001000 > > Soooo. The question is: Do I just define CBAUD by copy and paste into > a header file and add that to the complier includes? Or is their a > more informed and elegant answer to my problem? > > > > -- > *** e-Mail is NOT a SECURE channel *** > Do NOT transmit sensitive data via e-Mail > Do NOT open attachments nor follow links sent by e-Mail > > James B. Byrne mailto:ByrneJB@Harte-Lyne.ca > Harte & Lyne Limited http://www.harte-lyne.ca > 9 Brockley Drive vox: +1 905 561 1241 > Hamilton, Ontario fax: +1 905 561 0757 > Canada L8E 3C3 > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"