Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Dec 2006 20:53:23 -0900
From:      Beech Rintoul <freebsd@alaskaparadise.com>
To:        freebsd-questions@freebsd.org
Subject:   proftpd syntax error
Message-ID:  <200612142053.43768.freebsd@alaskaparadise.com>

next in thread | raw e-mail | index | archive | help
--nextPart29934464.8xynWNEtZU
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

I'm in the process of updating this port. I'm getting this on a test build:

support.c: In function `sreplace':
support.c:862: error: syntax error at end of input
gmake[1]: *** [support.o] Error 1
gmake[1]: Leaving directory=20
`/usr/ports/ftp/proftpd.test/work/proftpd-1.3.1rc1/src'
gmake: *** [src] Error 2
*** Error code 2

And here's the code in question:

const char *pr_strtime(time_t t) {
  static char buf[30];
  static char *mons[] =3D { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul",
    "Aug", "Sep", "Oct", "Nov", "Dec" };
  static char *days[] =3D { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"=
 };
  struct tm *tr;

  memset(buf, '\0', sizeof(buf));

  tr =3D localtime(&t);
  if (tr !=3D NULL) {
    snprintf(buf, sizeof(buf), "%s %s %2d %02d:%02d:%02d %d",
      days[tr->tm_wday], mons[tr->tm_mon], tr->tm_mday, tr->tm_hour,
      tr->tm_min, tr->tm_sec, tr->tm_year + 1900);

  } else
    buf[0] =3D '\0';

  buf[sizeof(buf)-1] =3D '\0';

  return buf;
}

Can someone tell  me what's wrong?

Beech
=2D-=20
=2D------------------------------------------------------------------------=
=2D-------------
Beech Rintoul - Sys. Administrator - beech@alaskaparadise.com
/"\   ASCII Ribbon Campaign  | Alaska Paradise Travel
\ / - NO HTML/RTF in e-mail  | 201 East 9Th Avenue Ste.310
 X  - NO Word docs in e-mail | Anchorage, AK 99501
/ \  - Please visit Alaska Paradise - http://www.alaskaparadise.com
=2D------------------------------------------------------------------------=
=2D-------------












--nextPart29934464.8xynWNEtZU
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (FreeBSD)

iD8DBQBFgjhnR5sEeCt9j00RApxKAJ9/e60xGm9ND9etiNHYQEs1WukLbgCfYOYc
+Z9w4ZhKQ0Gdlth0XDX9Ci8=
=GY6J
-----END PGP SIGNATURE-----

--nextPart29934464.8xynWNEtZU--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612142053.43768.freebsd>