-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use C99 format macro constants for timestamp and vlan_tag #28
Open
jefferyto
wants to merge
1
commit into
fln:master
Choose a base branch
from
jefferyto:use-c99-format-macro-constants
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jefferyto
added a commit
to jefferyto/openwrt-packages
that referenced
this pull request
Jul 4, 2021
Makefile changes include: * Remove USE_UCLIBC, as uclibc is no longer supported * Package output modules * Move main binary (back) to /usr/sbin, as it is system administration related and requires superuser privileges New patches: * 003-add-space-for-null-byte.patch - from fln/addrwatch@374cfd2 * 004-more-specific-library-linking.patch - from fln/addrwatch@27b57d9 * 005-use-c99-format-macro-constants.patch - from fln/addrwatch#28 Init script changes include: * Change from explicit disable to explicit enable, so that the service is disabled by default and on first install * Set config option default values to default values of the main binary * Fix command-line option names and format (from https://forum.openwrt.org/t/cant-start-addrwatch-service/60499/3) * Always use the --quiet command-line option, as the procd instance is not configured to capture stdout/stderr * Change the syslog config option to start the syslog output module Signed-off-by: Jeffery To <[email protected]>
Since timestamp and vlan_tag in the shm_log_entry struct are C99 fixed width integer types (uint64_t and uint16_t), the cross-platform way to print these values is to use the corresponding format macro constants[1], PRIu64 and PRIu16. This also adjusts the places where the time_t timestamp value is printed, casting it to uint64_t, for consistency. Fixes fln#25 Fixes fln#26 [1]: https://en.cppreference.com/w/c/types/integer#Format_macro_constants
b49c70f
to
11f224b
Compare
jefferyto
added a commit
to jefferyto/openwrt-packages
that referenced
this pull request
Jul 6, 2021
Makefile changes include: * Remove USE_UCLIBC, as uclibc is no longer supported * Package output modules * Move main binary (back) to /usr/sbin, as it is system administration related and requires superuser privileges New patches: * 003-add-space-for-null-byte.patch - from fln/addrwatch@374cfd2 * 004-more-specific-library-linking.patch - from fln/addrwatch@27b57d9 * 005-use-c99-format-macro-constants.patch - from fln/addrwatch#28 Init script changes include: * Change from explicit disable to explicit enable, so that the service is disabled by default and on first install * Set config option default values to default values of the main binary * Fix command-line option names and format (from https://forum.openwrt.org/t/cant-start-addrwatch-service/60499/3) * Always use the --quiet command-line option, as the procd instance is not configured to capture stdout/stderr * Change the syslog config option to start the syslog output module Signed-off-by: Jeffery To <[email protected]>
jefferyto
added a commit
to jefferyto/openwrt-packages
that referenced
this pull request
Jul 15, 2021
Makefile changes include: * Remove USE_UCLIBC, as uclibc is no longer supported * Package output modules * Move main binary (back) to /usr/sbin, as it is system administration related and requires superuser privileges New patches: * 003-add-space-for-null-byte.patch - from fln/addrwatch@374cfd2 * 004-more-specific-library-linking.patch - from fln/addrwatch@27b57d9 * 005-use-c99-format-macro-constants.patch - from fln/addrwatch#28 Init script changes include: * Change from explicit disable to explicit enable, so that the service is disabled by default and on first install * Set config option default values to default values of the main binary * Fix command-line option names and format (from https://forum.openwrt.org/t/cant-start-addrwatch-service/60499/3) * Always use the --quiet command-line option, as the procd instance is not configured to capture stdout/stderr * Change the syslog config option to start the syslog output module Signed-off-by: Jeffery To <[email protected]> (cherry picked from commit 31ae85b)
1715173329
pushed a commit
to immortalwrt/packages
that referenced
this pull request
Jul 15, 2021
Makefile changes include: * Remove USE_UCLIBC, as uclibc is no longer supported * Package output modules * Move main binary (back) to /usr/sbin, as it is system administration related and requires superuser privileges New patches: * 003-add-space-for-null-byte.patch - from fln/addrwatch@374cfd2 * 004-more-specific-library-linking.patch - from fln/addrwatch@27b57d9 * 005-use-c99-format-macro-constants.patch - from fln/addrwatch#28 Init script changes include: * Change from explicit disable to explicit enable, so that the service is disabled by default and on first install * Set config option default values to default values of the main binary * Fix command-line option names and format (from https://forum.openwrt.org/t/cant-start-addrwatch-service/60499/3) * Always use the --quiet command-line option, as the procd instance is not configured to capture stdout/stderr * Change the syslog config option to start the syslog output module Signed-off-by: Jeffery To <[email protected]> Signed-off-by: Tianling Shen <[email protected]>
jefferyto
added a commit
to jefferyto/openwrt-packages
that referenced
this pull request
Jul 15, 2021
Makefile changes include: * Include syslog output module * Move main binary (back) to /usr/sbin, as it is system administration related and requires superuser privileges New patches: * 003-add-space-for-null-byte.patch - from fln/addrwatch@374cfd2 * 004-more-specific-library-linking.patch - from fln/addrwatch@27b57d9 * 005-use-c99-format-macro-constants.patch - from fln/addrwatch#28 Init script changes include: * Fix command-line option names and format (from https://forum.openwrt.org/t/cant-start-addrwatch-service/60499/3) * Always use the --quiet command-line option, as the procd instance is not configured to capture stdout/stderr * Change the syslog config option to start the syslog output module Signed-off-by: Jeffery To <[email protected]>
utoni
pushed a commit
to utoni/openwrt-packages
that referenced
this pull request
Jan 21, 2022
Makefile changes include: * Remove USE_UCLIBC, as uclibc is no longer supported * Package output modules * Move main binary (back) to /usr/sbin, as it is system administration related and requires superuser privileges New patches: * 003-add-space-for-null-byte.patch - from fln/addrwatch@374cfd2 * 004-more-specific-library-linking.patch - from fln/addrwatch@27b57d9 * 005-use-c99-format-macro-constants.patch - from fln/addrwatch#28 Init script changes include: * Change from explicit disable to explicit enable, so that the service is disabled by default and on first install * Set config option default values to default values of the main binary * Fix command-line option names and format (from https://forum.openwrt.org/t/cant-start-addrwatch-service/60499/3) * Always use the --quiet command-line option, as the procd instance is not configured to capture stdout/stderr * Change the syslog config option to start the syslog output module Signed-off-by: Jeffery To <[email protected]>
1582130940
pushed a commit
to 1582130940/OpenWrt-Lean-Packages
that referenced
this pull request
Nov 10, 2022
Makefile changes include: * Remove USE_UCLIBC, as uclibc is no longer supported * Package output modules * Move main binary (back) to /usr/sbin, as it is system administration related and requires superuser privileges New patches: * 003-add-space-for-null-byte.patch - from fln/addrwatch@374cfd2 * 004-more-specific-library-linking.patch - from fln/addrwatch@27b57d9 * 005-use-c99-format-macro-constants.patch - from fln/addrwatch#28 Init script changes include: * Change from explicit disable to explicit enable, so that the service is disabled by default and on first install * Set config option default values to default values of the main binary * Fix command-line option names and format (from https://forum.openwrt.org/t/cant-start-addrwatch-service/60499/3) * Always use the --quiet command-line option, as the procd instance is not configured to capture stdout/stderr * Change the syslog config option to start the syslog output module Signed-off-by: Jeffery To <[email protected]>
1582130940
pushed a commit
to 1582130940/OpenWrt-Lean-Packages
that referenced
this pull request
Nov 10, 2022
Makefile changes include: * Remove USE_UCLIBC, as uclibc is no longer supported * Package output modules * Move main binary (back) to /usr/sbin, as it is system administration related and requires superuser privileges New patches: * 003-add-space-for-null-byte.patch - from fln/addrwatch@374cfd2 * 004-more-specific-library-linking.patch - from fln/addrwatch@27b57d9 * 005-use-c99-format-macro-constants.patch - from fln/addrwatch#28 Init script changes include: * Change from explicit disable to explicit enable, so that the service is disabled by default and on first install * Set config option default values to default values of the main binary * Fix command-line option names and format (from https://forum.openwrt.org/t/cant-start-addrwatch-service/60499/3) * Always use the --quiet command-line option, as the procd instance is not configured to capture stdout/stderr * Change the syslog config option to start the syslog output module Signed-off-by: Jeffery To <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since
timestamp
andvlan_tag
in theshm_log_entry
struct are C99 fixed width integer types (uint64_t
anduint16_t
), the cross-platform way to print these values is to use the corresponding format macro constants,PRIu64
andPRIu16
.This also adjusts the places where the
time_t
timestamp value is printed, casting it touint64_t
, for consistency.Fixes #25
Fixes #26