Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-23987

update of udf_example.c

    XMLWordPrintable

Details

    • Not for Release Notes
    • Make udf_example.c portable and warning-free.
    • Q3/2026 Server Maintenance

    Description

      Make portable usage of functions,

      bzero -> memset
      strmov -> strcpy
      #define strmov(a,b) stpcpy(a,b)
      

      only mysql.h needed get rid of other includes,
      get rid of warnings,

      $ gcc -c udf_example.c -I../include -I../../builds/10.3/include -fPIC
      udf_example.c:141:0: warning: "bzero" redefined
       #define bzero(a,b) memset(a,0,b)
      In file included from ../include/my_sys.h:20:0,
                       from udf_example.c:134:
      ../include/m_string.h:60:0: note: this is the location of the previous definition
       # define bzero(A,B)             memset((A),0,(B))
      

      update examples and example documentation in the code.

      Attachments

        Activity

          People

            raghunandan.bhat Raghunandan Bhat
            anel Anel Husakovic
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0d
                0d
                Logged:
                Time Spent - 3h
                3h

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.