diff options
| author | Rich Megginson <rmeggins@redhat.com> | 2005-03-05 23:55:10 +0000 |
|---|---|---|
| committer | Rich Megginson <rmeggins@redhat.com> | 2005-03-05 23:55:10 +0000 |
| commit | 454c5dcf11a5fc41f5dc2bf280fec167d686bcdf (patch) | |
| tree | d49919bc71616a454dbc37287bfce0a563ddda51 /ldap/admin/src/namegen.c | |
| parent | a71ecb02bafbb303b35bae0bca6383fce30b8c21 (diff) | |
fix Windows build - use local functions instead of NSPR - fix compiler warnings
Diffstat (limited to 'ldap/admin/src/namegen.c')
| -rw-r--r-- | ldap/admin/src/namegen.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ldap/admin/src/namegen.c b/ldap/admin/src/namegen.c index bdb8c4e1..49af8886 100644 --- a/ldap/admin/src/namegen.c +++ b/ldap/admin/src/namegen.c @@ -46,7 +46,8 @@ int main (int argc, char **argv) strftime(szDate, sizeof (szDateFile), "%Y_%m_%d_%H%M%S", sCurTime); - PR_snprintf (szDateFile, sizeof(szDateFile), "%s.bat", szDate); + _snprintf (szDateFile, sizeof(szDateFile), "%s.bat", szDate); + szDateFile[sizeof(szDateFile)-1] = (char)0; /* create date batch file */ fBatch = fopen (szDateFile, "w"); @@ -73,7 +74,8 @@ int main (int argc, char **argv) exit (1); } - PR_snprintf (szCmd, sizeof(szCmd), "call %s", szDate); + _snprintf (szCmd, sizeof(szCmd), "call %s", szDate); + szCmd[sizeof(szCmd)-1] = (char)0; rt = fwrite (szCmd, strlen (szCmd), 1, fBatch); if (rt != 1) @@ -92,7 +94,8 @@ int main (int argc, char **argv) exit (1); } - PR_snprintf (szCmd, sizeof(szCmd), "del %s\ndel bstart.bat\nset DATESTR=", szDateFile); + _snprintf (szCmd, sizeof(szCmd), "del %s\ndel bstart.bat\nset DATESTR=", szDateFile); + szCmd[sizeof(szCmd)-1] = (char)0; rt = fwrite (szCmd, strlen(szCmd), 1, fBatch); if (rt != 1) |
