Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 May 1997 10:15:02 +0300 (IDT)
From:      Nadav Eiron <nadav@barcode.co.il>
To:        hackers@freebsd.org
Subject:   ftpio.h is not C++ safe.
Message-ID:  <Pine.BSF.3.91.970502101222.18237A-200000@gatekeeper.barcode.co.il>

next in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--0-1451156947-862557302=:18237
Content-Type: TEXT/PLAIN; charset=US-ASCII

Hi,

I hope that's the right place for this (my first contribution to the 
source code):

ftpio.h, both on 2.1.7R and 2.2.1R (don't run 3.0 here) will not work as 
C++ (it's missing extern "C" around things).

I've patched it, and also took the opportunity to patch the function 
prototypes to compile correctly under K&R C.

comments?

Nadav
--0-1451156947-862557302=:18237
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="ftpio.h.diff"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.BSF.3.91.970502101502.18237B@gatekeeper.barcode.co.il>
Content-Description: 

KioqIGZ0cGlvLmgub3JpZwlGcmkgRmViICA3IDA0OjUxOjMzIDE5OTcNCi0t
LSBmdHBpby5oCUZyaSBNYXkgIDIgMTA6MDI6MzYgMTk5Nw0KKioqKioqKioq
KioqKioqDQoqKiogMiw3ICoqKioNCi0tLSAyLDggLS0tLQ0KICAjZGVmaW5l
IF9GVFBfSF9JTkNMVURFDQogIA0KICAjaW5jbHVkZSA8c3lzL3R5cGVzLmg+
DQorICNpbmNsdWRlIDxzeXMvY2RlZnMuaD4NCiAgI2luY2x1ZGUgPHN0ZGlv
Lmg+DQogICNpbmNsdWRlIDx0aW1lLmg+DQogIA0KKioqKioqKioqKioqKioq
DQoqKiogNDIsNjQgKioqKg0KICAgIGNvbnN0IGludAludW07DQogICAgY29u
c3QgY2hhcgkqc3RyaW5nOw0KICB9Ow0KICBleHRlcm4gc3RydWN0CWZ0cGVy
ciBmdHBFcnJMaXN0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lCV9fUCgoRklMRSAq
ZnAsIGludCBzdGF0dXMpKTsNCiEgZXh0ZXJuIHZvaWQJZnRwVmVyYm9zZQlf
X1AoKEZJTEUgKmZwLCBpbnQgc3RhdHVzKSk7DQohIGV4dGVybiBGSUxFCSpm
dHBHZXRVUkwJX19QKChjaGFyCSp1cmwsIGNoYXIgKnVzZXIsIGNoYXIgKnBh
c3N3ZCwJaW50ICpyZXRjb2RlKSk7DQohIGV4dGVybiBGSUxFCSpmdHBQdXRV
UkwJX19QKChjaGFyCSp1cmwsIGNoYXIgKnVzZXIsIGNoYXIgKnBhc3N3ZCwJ
aW50ICpyZXRjb2RlKSk7DQohIGV4dGVybiB0aW1lX3QJZnRwR2V0TW9kdGlt
ZQlfX1AoKEZJTEUgKmZwLCBjaGFyICpzKSk7DQohIGV4dGVybiBjb25zdAlj
aGFyICpmdHBFcnJTdHJpbmcJX19QKChpbnQgZXJybm8pKTsNCiEgX19FTkRf
REVDTFMNCiAgDQogICNlbmRpZgkvKiBfRlRQX0hfSU5DTFVERSAqLw0K
--0-1451156947-862557302=:18237--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.970502101222.18237A-200000>