Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
brechtsanders committed Jan 20, 2021
1 parent 232c9f5 commit f4e63cb
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 50 deletions.
4 changes: 0 additions & 4 deletions ADGetPhoto.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#include <stdio.h>
#include <ctype.h>
#ifdef _WIN32
#include <windows.h>
#include <lmaccess.h>
#endif
#include <string>
#include <vector>
#include "adreports_version.h"
Expand Down
7 changes: 0 additions & 7 deletions ADReportComputers.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
#include <stdio.h>
#include <ctype.h>
#ifdef _WIN32
#include <windows.h>
#include <lmaccess.h>
#else
#define UF_ACCOUNTDISABLE 2
#define UF_LOCKOUT 16
#endif
#include <string>
#include <vector>
#include "adreports_version.h"
Expand Down
5 changes: 0 additions & 5 deletions ADReportGroups.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#include <stdio.h>
#include <ctype.h>
#ifdef _WIN32
#include <windows.h>
#include <lmaccess.h>
#else
#endif
#include <string>
#include <vector>
#include "adreports_version.h"
Expand Down
8 changes: 0 additions & 8 deletions ADReportUsers.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
#include <stdio.h>
#include <ctype.h>
#ifdef _WIN32
#include <windows.h>
#include <lmaccess.h>
#else
#define UF_ACCOUNTDISABLE 2
#define UF_LOCKOUT 16
#define UF_DONT_EXPIRE_PASSWD 65536
#endif
#include <string>
#include <vector>
#include "adreports_version.h"
Expand Down
4 changes: 4 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2021-01-20 - version 1.4.7
- fixes for OpenLDAP compatibility
- fixes for handling int64_t types

2020-03-05 - version 1.4.6
- added -n option to ADReportGroups to show number of members and enables members

Expand Down
7 changes: 0 additions & 7 deletions CheckUserFolders.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@
#include <dirent.h>
#include <sys/types.h>
#include <sys/stat.h>
#ifdef _WIN32
#include <windows.h>
#include <lmaccess.h>
#else
#define UF_ACCOUNTDISABLE 2
#define UF_LOCKOUT 16
#endif
#include <string>
#include <vector>
#include "adreports_version.h"
Expand Down
10 changes: 3 additions & 7 deletions adformats.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#ifdef __MINGW32__
#define PRINTF_INT64_MODIFIER "I64"
#else
#define PRINTF_INT64_MODIFIER "ll"
#endif
#include <stdint.h>
#include <inttypes.h>

const char* format_time (time_t timestamp)
{
Expand Down Expand Up @@ -90,7 +86,7 @@ const char* time2timevalue (time_t timestamp)
//#ifdef _WIN32
// lltoa(time2timevalue_n(timestamp), buf, 10);
//#else
snprintf(buf, sizeof(buf), "%" PRINTF_INT64_MODIFIER "i", time2timevalue_n(timestamp));
snprintf(buf, sizeof(buf), "%" PRIi64, time2timevalue_n(timestamp));
//#endif
return buf;
}
Expand Down
2 changes: 1 addition & 1 deletion adreports_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/*! \brief minor version number */
#define ADREPORTS_VERSION_MINOR 4
/*! \brief micro version number */
#define ADREPORTS_VERSION_MICRO 6
#define ADREPORTS_VERSION_MICRO 7
/*! @} */

/*! \cond PRIVATE */
Expand Down
19 changes: 8 additions & 11 deletions dataoutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,15 @@
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdint.h>
#include <inttypes.h>
#ifdef USE_XLSXIO
#include <unistd.h>
#endif

#ifdef __MINGW32__
#ifndef __MINGW64_VERSION_MAJOR
#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
#define strcasecmp stricmp
#endif
#define PRINTF_INT64_MODIFIER "I64"
#else
#define PRINTF_INT64_MODIFIER "ll"
#endif

////////////////////////////////////////////////////////////////////////

Expand Down Expand Up @@ -165,7 +162,7 @@ void DataOutputTSV::AddData (int64_t value)
{
if (col++)
fprintf(dst, "\t");
fprintf(dst, "%" PRINTF_INT64_MODIFIER "i", value);
fprintf(dst, "%" PRIi64, value);
}

void DataOutputTSV::AddData (double value)
Expand Down Expand Up @@ -237,9 +234,9 @@ void DataOutputTXT::AddData (int64_t value)
if (col++)
fprintf(dst, " ");
if (colwidths[col - 1] > 0)
fprintf(dst, "%*" PRINTF_INT64_MODIFIER "i", (int)colwidths[col - 1], value);
fprintf(dst, "%*" PRIi64, (int)colwidths[col - 1], value);
else
fprintf(dst, "%" PRINTF_INT64_MODIFIER "i", value);
fprintf(dst, "%" PRIi64, value);
}

void DataOutputTXT::AddData (double value)
Expand Down Expand Up @@ -365,7 +362,7 @@ void DataOutputHTML::AddData (int value)
void DataOutputHTML::AddData (int64_t value)
{
col++;
fprintf(dst, "<td align=\"right\">%" PRINTF_INT64_MODIFIER "i</td>", value);
fprintf(dst, "<td align=\"right\">%" PRIi64 "</td>", value);
}

void DataOutputHTML::AddData (double value)
Expand Down Expand Up @@ -605,7 +602,7 @@ void DataOutputXML::AddData (int value)
void DataOutputXML::AddData (int64_t value)
{
col++;
fprintf(dst, "<Cell><Data ss:Type=\"Number\">%" PRINTF_INT64_MODIFIER "i</Data></Cell>", value);
fprintf(dst, "<Cell><Data ss:Type=\"Number\">%" PRIi64 "</Data></Cell>", value);
}

void DataOutputXML::AddData (double value)
Expand Down
4 changes: 4 additions & 0 deletions ldapconnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@
#if USE_WINLDAP
#include <windows.h>
#include <winldap.h>
#include <lmaccess.h>
#else
#include <ldap.h>
#define UF_ACCOUNTDISABLE 2
#define UF_LOCKOUT 16
#define UF_DONT_EXPIRE_PASSWD 65536
#ifndef NO_PAGED_LDAP
#define NO_PAGED_LDAP
#endif
Expand Down

0 comments on commit f4e63cb

Please sign in to comment.